Inserting text into a word document using a macro
Posted on 2015-01-22
I am trying to write a macro to insert a word at the beginning of each paragraph based on a selection in a Microsoft Word document. For example, "1. Some text here" would change to "WORD 1. Some text here" after running the macro. So far I have this, but I only want the Macro to run with a selection, not the whole document.
iParCount = ActiveDocument.Paragraphs.Count
For j = 1 To iParCount
sMyPar = "Note " + ActiveDocument.Paragraphs(j).Range.Text
ActiveDocument.Paragraphs(j).Range.Text = sMyPar