Skip to content

Latest commit

 

History

History
52 lines (30 loc) · 1007 Bytes

File metadata and controls

52 lines (30 loc) · 1007 Bytes
title Range.HighlightColorIndex property (Word)
keywords vbawd10.chm157155629
f1_keywords
vbawd10.chm157155629
api_name
Word.Range.HighlightColorIndex
ms.assetid ff6e0f1a-8b37-1bdd-8da6-ac492d399ad2
ms.date 06/08/2017
ms.localizationpriority medium

Range.HighlightColorIndex property (Word)

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

Syntax

expression. HighlightColorIndex

expression Required. A variable that represents a Range object.

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

See also

Range Object

[!includeSupport and feedback]