Skip to content

Latest commit

 

History

History
62 lines (37 loc) · 1.37 KB

File metadata and controls

62 lines (37 loc) · 1.37 KB
title Shading.BackgroundPatternColor property (Word)
keywords vbawd10.chm154796037
f1_keywords
vbawd10.chm154796037
api_name
Word.Shading.BackgroundPatternColor
ms.assetid 0d78f926-0fe6-aa37-bd39-c7233a5bf3e8
ms.date 06/08/2017
ms.localizationpriority medium

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

Shading Object

[!includeSupport and feedback]