ForegroundPatternColorIndex Property

Microsoft Word Visual Basic

ForegroundPatternColorIndex Property

       

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.

WdColorIndex can be one of these WdColorIndex constants.
wdAuto
wdBlack
wdBlue
wdBrightGreen
wdByAuthor
wdDarkBlue
wdDarkRed
wdDarkYellow
wdGray25
wdGray50
wdGreen
wdNoHighlight
wdPink
wdRed
wdTeal
wdTurquoise
wdViolet
wdWhite
wdYellow

expression.ForegroundPatternColorIndex

expression   Required. An expression that returns one of the objects in the Applies To list.

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