HighlightColor, HighlightColor()

Syntax

HighlightColor Color

HighlightColor()

Remarks

The HighlightColor statement sets the highlight color for the selected text. If no text is selected, the HighlightColor statement has no effect. Use the ToolsOptionsRevisions statement to change the default highlight color.

In Word version 6.0, HighlightColor and HighlightColor() are unavailable and generate errors.

Argument

Explanation

Color

The highlight color. For a list of colors and their values, see CharColor.

If Color is set to 0 (zero), highlight formatting is removed.


The HighlightColor() function returns the following values.

Value

Explanation

-1

If the selection contains text with different highlight colors.

0 (zero)

If the selection contains no highlight formatting.

n

A number indicating the highlight color. For a list of colors and their corresponding numeric values, see CharColor.


See Also

EditFindHighlight, EditReplaceHighlight, Highlight, ToolsOptionsRevisions