Share via


FillFormat.PresetTexture Property

Publisher Developer Reference

Returns an MsoPresetTexture constant that represents the preset texture for the specified fill. Read-only.

Syntax

expression.PresetTexture

expression   A variable that represents a FillFormat object.

Return Value
MsoPresetTexture

Remarks

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

Use the PresetTextured method to specify the preset texture for the fill.

Example

This example adds a rectangle to the first page in the active publication and sets its preset texture to match that of the first shape on the page. For the example to work, the first shape must have a preset textured fill.

Visual Basic for Applications
  Sub SetTexture()
    Dim texture As MsoPresetTexture
    With ActiveDocument.Pages(1).Shapes
            texture = .Item(1).Fill.PresetTexture
        With .AddShape(Type:=msoShapeRectangle, Left:=250, Top:=72, _
                Width:=40, Height:=80)
            .Fill.PresetTextured PresetTexture:=texture
        End With
    End With
End Sub

See Also