Set the Find.Highlight property to true
.
Interop uses the same objects and methods that are available for VBA macros. You can find the actions, properties needed to complete the task by writing a macro with these steps and checking it.
Often, but not always, properties correspond to the user interface. If something is a property in the general Search field, this is probably a property in the interface Find
.
, :
Selection.Find.ClearFormatting
Selection.Find.Highlight = True
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
:
range.Find.ClearFormatting();
range.Find.Highlight=1;
...
while(range.Find.Execute())
{
...
}