Muokkaa

Jaa


Shading object (Word)

Contains shading attributes for an object.

Remarks

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

Name
Application
BackgroundPatternColor
BackgroundPatternColorIndex
Creator
ForegroundPatternColor
ForegroundPatternColorIndex
Parent
Texture

See also

Word Object Model Reference

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.