Font.ColorIndex property (Word)
Returns or sets a WdColorIndex constant that represents the color for the specified font. Read/write .
expression.ColorIndex
expression Required. A variable that represents a Font object.
The wdByAuthor constant is not a valid color for fonts.
This example changes the color of the text in the first paragraph in the active document.
ActiveDocument.Paragraphs(1).Range.Font.ColorIndex = wdGreen
This example formats the selected text to appear in red.
Selection.Font.ColorIndex = wdRed
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.