FillFormat.Pattern property (Publisher)

Returns an MsoPatternType constant that represents the pattern applied to the specified fill or line.

Syntax

expression.Pattern

expression A variable that represents a FillFormat object.

Remarks

The Pattern property value can be one of the MsoPatternType constants declared in the Microsoft Office type library.

Example

This example sets the pattern for the specified shape if the shape currently doesn't have a fill pattern. This example assumes that at least one shape exists on the first page of the active publication.

Sub ChangeFillPattern() 
 With ActiveDocument.Pages(1).Shapes(1).Fill 
 If .Pattern < msoPattern10Percent Then 
 .Patterned Pattern:=msoPattern25Percent 
 End If 
 End With 
End Sub

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.