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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top