FillFormat.Patterned method (Word)
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.
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
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.