I'm new to VBA and would greatly appreciate some help on a problem. I have long Word documents where I need to apply standard comments to the same set of keywords, but only in selected sections of the document. The following macro worked to find a keyword and apply a comment, but I'm having trouble making some modifications: Sub item_wording() ' ' item_wording Macro ' ' Do While Selection.Find.Execute("keyword1") = True ActiveDocument.Comments.Add range:=Selection.range, Text:="comment for first keyword" Loop End Sub The two modifications are: 1) only apply the comments to user selected text, not the whole document. I tried a "With Selection.Range.Find" approach but I don't think comments ca...
ادامه مطلب