insering the same text at the end of every paragrapg in a word doc

Copper Contributor

Hello,

I want to add a small  sentence at the end of all paragraphs in a word text . Is there an automatic way to do it? maybe with autotext? 

2 Replies

@dorapop 

 

Use a macro containing the following code

 

Dim i As Long
Dim rng As Range
With ActiveDocument
     For i = 1 To .Paragraphs.Count
           Set rng = .Paragraphs(i).Range
           rng.End = rng.End - 1
           rng.InsertAfter " Some new text."
     Next i
End With

@DagMVP thank you so much! I will try it right away.