Hi,
I'm trying the following. I want to search for a word, select the whole sentence and add a comment to the sentence.
My macro works, but only for the word I search for. How can I select the whole sentence?
Any help would be more than welcome.
Regards,
Frits
Sub Keywordselection()
'
' Select keywords and add automatic comment
'
Dim range As range
Set range = ActiveDocument.Content
Text = InputBox("Type a keyword you want to search for")
Do While range.Find.Execute(Text) = True
ActiveDocument.Comments.Add range, "This is the keyword incl sentence you have been searching for"
Loop
End Sub