HighlightColorIndex Property
Applies To
Range object.
Description
Returns or sets the highlight color for the specified range. Can be one of the following WdColorIndex constants: wdNoHighlight, wdBlack, wdBlue, wdBrightGreen, wdDarkBlue, wdDarkRed, wdDarkYellow, wdGray25, wdGray50, wdGreen, wdPink, wdRed, wdTeal, wdTurquoise, wdViolet, wdWhite, or wdYellow. Read/write Long.
Note Setting this property to wdNoHighlight removes the highlight color (if any) from the specified range.
See Also
ColorIndex property, ShowHighlight property.
Example
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