Shading.ForegroundPatternColorIndex Property

Word Developer Reference

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.

Visual Basic for Applications
  With Selection.Shading
    .Texture = wdTexture30Percent
    .ForegroundPatternColorIndex = wdBlue
    .BackgroundPatternColorIndex = wdYellow
End With

See Also