DefaultHighlightColorIndex Property

Microsoft Word Visual Basic

Returns or sets the color used to highlight text formatted with the Highlight button (Formatting toolbar). Read/write WdColorIndex.

WdColorIndex can be one of these WdColorIndex constants.
wdAuto
wdBlack
wdBlue
wdBrightGreen
wdByAuthor
wdDarkBlue
wdDarkRed
wdDarkYellow
wdGray25
wdGray50
wdGreen
wdNoHighlight
wdPink
wdRed
wdTeal
wdTurquoise
wdViolet
wdWhite
wdYellow

expression.DefaultHighlightColorIndex

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example sets the default highlight color to bright green. The new color doesn't apply to any previously highlighted text.

Options.DefaultHighlightColorIndex = wdBrightGreen
		

This example returns the current default highlight color index.

Dim lngTemp As Long

lngTemp = Options.DefaultHighlightColorIndex