There are no 'lines' in a Word document. The following will highlight text formatted as wdColorAutomatic
Code:
With Selection.Find
.ClearFormatting
.Font.Color = wdColorAutomatic
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
Do While .Execute
Selection.Range.HighlightColorIndex = wdYellow
Loop
End With
If by line you mean paragraph then use the following instead to highlight paragraphs that are all formatted as wdAuto
Code:
Dim oRng As Range
Dim oPara As Paragraph
For Each oPara In ActiveDocument.Paragraphs
If oPara.Range.Font.ColorIndex = wdAuto Then
oPara.Range.HighlightColorIndex = wdYellow
End If
Next oPara