Shading.ForegroundPatternColorIndex property (Word)

Returns or sets the color that's applied to the foreground of the Shading object. This color is applied to the dots and lines in the shading pattern. Read/write WdColorIndex.

Syntax

expression. ForegroundPatternColorIndex

expression Required. A variable that represents a 'Shading' object.

Example

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

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

See also

Shading Object

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.