Sub Highlight_WordN() Dim oRng As Range Dim oComment As Comment Set oRng = ActiveDocument.Range With oRng.Find Do While .Execute(FindText:="HAPPY") oRng.Paragraphs(1).Range.HighlightColorIndex = wdYellow Set oComment = ActiveDocument.Comments.Add(oRng.Paragraphs(1).Range, "Whatever text you want as the comment") oRng.Collapse 0 Loop End With lbl_Exit: Set oRng = Nothing Set oComment = Nothing Exit Sub End Sub




Reply With Quote