BackgroundPatternColorIndex Property

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.BackgroundPatternColorIndex

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

Example

This example applies cyan background shading to the first paragraph in the active document.

Dim rngTemp As Range

Set rngTemp = ActiveDocument.Paragraphs(1).Range
rngTemp.Shading.BackgroundPatternColorIndex = wdTurquoise

This example adds a table at the insertion point and then applies light gray background shading to the first cell.

Dim tableNew As Table

Selection.Collapse Direction:=wdCollapseStart
Set tableNew = ActiveDocument.Tables.Add(Range:=Selection.Range, _
    NumRows:=2, NumColumns:=2)
tableNew.Cell(1, 1).Shading.BackgroundPatternColorIndex = _
    wdGray25

Applies to | Shading Object

See Also | BackgroundPatternColor Property | ColorIndex Property | ForegroundPatternColorIndex Property | Shading Object | Shading Property | Texture Property