Compartilhar via


Shading.BackgroundPatternColor Property (Word)

Returns or sets the 24-bit color that's applied to the background of the Shading object. Read/write.

Syntax

expression .BackgroundPatternColor

expression Required. A variable that represents a Shading object.

Remarks

This property can be any valid WdColor constant or a value returned by Visual Basic's RGB function.

Example

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

Set myRange = ActiveDocument.Paragraphs(1).Range 
myRange.Shading.BackgroundPatternColor = _ 
 wdColorTurquoise

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.BackgroundPatternColor = _ 
 wdColorGray25

See Also

Concepts

Shading Object

Shading Object Members