Text highlighting and maintaining the format

A

AT

Hi,

My code highlight the text in a Word document with the following snippet.

MyFoundRange.HighlightColorIndex =
Microsoft.Office.Interop.Word.WdColorIndex.wdBlue;
MyFoundRange.Font.ColorIndex =
Microsoft.Office.Interop.Word.WdColorIndex.wdWhite;

Once I go to the next item in my list, the previously highlighted text range
should go back to its original font color and its own format.

Considering my range had two words, one in custom selected blue color and
the other word in custom selected green color.

How do I do this?
 

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