Situation:
I\'m working with MS Word document\'s contents. I\'m changing color of some words according to some rule. Words coloring occurs on each KeyPress event.
P
To set default color you have two options:
//really default color:
r.Font.ColorIndex = Word.WdColorIndex.wdAuto;
//assuming default is black- set it to black
r.Font.ColorIndex = Word.WdColorIndex.wdBlack;
Edit. To set the color back to default as of selected range you could try this code:
Word.Application.Selection.Font.ColorIndex = Word.WdColorIndex.wdAuto;
It doesn't refer to active document but to Selection
of the application. After you run it next words are written in default color.