Hi,
I am doing Office (Word) programming in .Net with Microsoft.Offic e.Interop.Word.
My C# code highlights the a text range in a Word document with the following snippet.
MyFoundRange.Hi ghlightColorInd ex =
Microsoft.Offic e.Interop.Word. WdColorIndex.wd Blue;
MyFoundRange.Fo nt.ColorIndex =
Microsoft.Offic e.Interop.Word. WdColorIndex.wd White;
Once I go to the next item to highlight, the previously highlighted text range
should go back to its original font color and its own format (removing highlight).
Considering my range has two words, one in custom selected blue color and
the other word in custom selected green color. After I move away from the selection with the above code, the range should show the same text before it got highlighted. I tried applying wdAuto which is making the selected range to black color text.
How do I do this?
I am doing Office (Word) programming in .Net with Microsoft.Offic e.Interop.Word.
My C# code highlights the a text range in a Word document with the following snippet.
MyFoundRange.Hi ghlightColorInd ex =
Microsoft.Offic e.Interop.Word. WdColorIndex.wd Blue;
MyFoundRange.Fo nt.ColorIndex =
Microsoft.Offic e.Interop.Word. WdColorIndex.wd White;
Once I go to the next item to highlight, the previously highlighted text range
should go back to its original font color and its own format (removing highlight).
Considering my range has two words, one in custom selected blue color and
the other word in custom selected green color. After I move away from the selection with the above code, the range should show the same text before it got highlighted. I tried applying wdAuto which is making the selected range to black color text.
How do I do this?