Shading Object

Multiple objects
Shading

Contains shading attributes for an object.

Using the Shading Object

Use the Shading property to return the Shading object. The following example applies fine gray shading to the first paragraph in the active document.

ActiveDocument.Paragraphs(1).Shading.Texture = wdTexture10Percent

The following example applies shading with different foreground and background colors to the selection.

With Selection.Shading
    .Texture = wdTexture20Percent
    .ForegroundPatternColorIndex = wdBlue
    .BackgroundPatternColorIndex = wdYellow
End With

The following example applies a vertical line texture to the first row in the first table in the active document.

ActiveDocument.Tables(1).Rows(1).Shading.Texture = _
    wdTextureVertical

Properties | Application Property | BackgroundPatternColor Property | BackgroundPatternColorIndex Property | Creator Property | ForegroundPatternColor Property | ForegroundPatternColorIndex Property | Parent Property | Texture Property

Parent Objects | Cell Object | Cells Collection | Column Object | Columns Collection | ConditionalStyle Object | Font Object | Frame Object | Paragraph Object | ParagraphFormat Object | Paragraphs Collection | Range Object | Row Object | Rows Collection | Selection Object | Style Object | Table Object | TableStyle Object

Child Objects

See Also | Borders Collection Object