I found the code below searching through this forum that Greg Maxey created to remove specific colour highlighting. I'm trying to update the code to remove both BrightGreen and Pink highlighting within a document. It seems to be working ok but just wanted to make sure I've added to the code correctly? Thanks.
Code:
Sub ScratchMacro()
'A basic Word Macro coded by Gregory K. Maxey
Dim oRng As Range
Dim oChr As Range
Set oRng = ActiveDocument.Range
With oRng.Find
.Highlight = True
While .Execute
Select Case oRng.HighlightColorIndex
Case Is = 9999999
For Each oChr In oRng.Characters
If oChr.HighlightColorIndex = wdBrightGreen Then
oChr.HighlightColorIndex = wdAuto
End If
'Next
If oChr.HighlightColorIndex = wdPink Then
oChr.HighlightColorIndex = wdAuto
End If
Next
Case Is = wdBrightGreen
oRng.HighlightColorIndex = wdAuto
Case Is = wdPink
oRng.HighlightColorIndex = wdAuto
End Select
oRng.Collapse wdCollapseEnd
Wend
End With
lbl_Exit:
Exit Sub
End Sub