Edit

Share via


Font.ColorIndex property (Word)

Returns or sets a WdColorIndex constant that represents the color for the specified font. Read/write .

Syntax

expression.ColorIndex

expression Required. A variable that represents a Font object.

Remarks

The wdByAuthor constant is not a valid color for fonts.

Example

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

See also

Font Object

Support and feedback

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.