3
Answers

Changing text color in word atomation

Mehmet Fatih

Mehmet Fatih

1y
376
1

I want to make the text color of the x sign red. I have tried this oWord.Selection.Font.ColorIndex = Word.WdColorIndex.wdRed; but it didn't work.

 if (fieldName == "K")
 {
     myMergeField.Select();
     oWord.Selection.TypeText("X");   // I want to make the x sign red

     oWord.Selection.Font.ColorIndex = Word.WdColorIndex.wdRed;
 } 

Answers (3)