You could use a macro such as the following to apply red underlining to a Selection:
Sub ColoredUnderline()
Application.ScreenUpdating = False
Dim StrTxt As String, Fld As Field, Rng As Range
ActiveWindow.View.ShowFieldCodes = True
With Selection
StrTxt = .Text
Set Fld = .Fields.Add(Range:=Selection.Range, Type:=wdFieldEmpty, _
PreserveFormatting:=False, Text:="EQ \s\do8(\f(" & StrTxt & ",))")
.MoveLeft wdCharacter, 2
.Delete
Set Rng = Fld.Code
With Rng
.Font.ColorIndex = wdRed
.Start = .Start + InStr(.Text, StrTxt) - 1
.End = .Start + Len(StrTxt)
.Font.ColorIndex = wdAuto
End With
.Fields.Update
End With
ActiveWindow.View.ShowFieldCodes = False
Application.ScreenUpdating = True
End Sub
You could of course, change both the underline colour, currently set via .Font.ColorIndex = wdRed, and the text colour, currently set via .Font.ColorIndex = wdAuto. Because the field displays the underlining below the text instead of running through character
descenders, line heights will increase slightly. Changing the 8 in the code affects how high above/below the line the underlining will be.
Notes: If the range spanned by an EQ field exceeds the amount that be displayed on a single line or spans a paragraph break, the result will be an 'Error!' display in the document. Similarly, if the range spanned by ab EQ field includes
any line-wrapping or a manual line break, the entire field will be pushed to the next line - a manual linebreak will be displayed as a narrow vertical rectangle in the output.