remove highlight in whole document
Hi,
Can any one help me to modify the code, this will remove the highlighted text at only one place, but i would like to remove in the whole active document.
Sub SearchAnyHighlight()
Dim hiliRng As Range
Set hiliRng = ActiveDocument.Content
With hiliRng.Find
.Highlight = True
.Execute
If hiliRng.Find.Found Then
MsgBox "You can't close Active Document"
Do While hiliRng.Find.Execute
If hiliRng.HighlightColorIndex = wdBrightGreen Then
hiliRng.HighlightColorIndex = wdNoHighlight
End If
Loop
End If
End With
End Sub
|