Поделиться через


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

Concepts

Font Object Members

Font Object