highlight all when using Find

S

SM

Hi ,
How can I highlight all the results of find query
when using content/selection.Find.
 
D

Dave Lett

Hi SM,

Are you looking for something like the following:

''' set the color for highlighting
Options.DefaultHighlightColorIndex = wdGray25

With Selection
.HomeKey Unit:=wdStory
With .Find
.ClearFormatting
.Text = "Test"
With .Replacement
.ClearFormatting
.Highlight = True
End With
.Execute Replace:=wdReplaceAll
End With
End With

HTH,
Dave
 
Top