Share via


FillFormat.Patterned Method

Word Developer Reference

Sets the specified fill to a pattern.

Syntax

expression.Patterned(Pattern)

expression   Required. A variable that represents a FillFormat object.

Parameters

Name Required/Optional Data Type Description
Pattern Required MsoPatternType The pattern to be used for the specified fill.

Remarks

Use the BackColor and ForeColor properties to set the colors used in the pattern.

Example

This example adds an oval with a patterned fill to the active document.

Visual Basic for Applications
  Sub FillPattern()
    With ActiveDocument.Shapes.AddShape _
        (msoShapeOval, 60, 60, 80, 40).Fill
        .ForeColor.RGB = RGB(128, 0, 0)
        .BackColor.RGB = RGB(0, 0, 255)
        .Patterned msoPatternDarkVertical
    End With
End Sub

See Also