1. Find/remove underline with specific color?
2. Is there a way .... which underline color is <> wdColorAutomatic
Those are two separate questions.
Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
.Font.UnderlineColor = wdColorRed
While .Execute
oRng.Font.Underline = wdUnderlineNone
Wend
End With
lbl_Exit:
Exit Sub
End Sub
Sub ScratchMacroII()
'A basic Word macro coded by Greg Maxey
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
.Font.Underline = True
While .Execute
If oRng.Font.UnderlineColor <> wdColorAutomatic Then
oRng.Font.Underline = wdUnderlineNone
End If
Wend
End With
lbl_Exit:
Exit Sub
End Sub