BackgroundPatternColorIndex Property
Applies To
Shading object.
Description
Returns or sets the color that's applied to the background of the Shading object. Read/write Long.
Can be one of the following WdColorIndex constants:
See Also
ColorIndex property, ForegroundPatternColorIndex property, Shading property, Texture property.
Example
This example applies cyan background shading to the first paragraph in the active document.
Set myRange = ActiveDocument.Paragraphs(1).Range
myRange.Shading.BackgroundPatternColorIndex = wdTurquoise
This example adds a table at the insertion point and then applies light gray background shading to the first cell.
Selection.Collapse Direction:=wdCollapseStart
Set myTable = ActiveDocument.Tables.Add(Range:=Selection.Range, _
NumRows:=2, NumColumns:=2)
myTable.Cell(1, 1).Shading.BackgroundPatternColorIndex = wdGray25