HighlightColorIndex Property
TOC
Collapse the table of content
Expand the table of content

Range.HighlightColorIndex Property (Word)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Returns or sets the highlight color for the specified range. Read/write WdColorIndex.

expression .HighlightColorIndex

expression Required. A variable that represents a Range object.

This example removes highlight formatting from the selection.

Selection.Range.HighlightColorIndex = wdNoHighlight

This example applies yellow highlighting to each bookmark in the active document.

For Each abookmark In ActiveDocument.Bookmarks 
 abookmark.Range.HighlightColorIndex = wdYellow 
Next abookmark

Concepts

Other resources

Show:
© 2016 Microsoft