Share via


FillFormat.Pattern Property

Publisher Developer Reference

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.

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

See Also