Share via


TextureName Property.TextureName Property

Publisher Developer ReferencePublisher Developer Reference

Returns a String indicating the name of the custom texture file for the specified fill. Read-only.

Syntax

expression.TextureName

expression   A variable that represents a TextureName Property object.

Return Value
String

Remarks

Use the UserTextured method to set the texture file for the fill.

Example

This example adds an oval to the active publication. If shape one on the active publication has a fill with a user-defined texture, the new oval will have the same fill as shape one. If shape one has any other type of fill, the new oval will have a green marble fill.

Visual Basic for Applications
  Dim ffNew As FillFormat

With ActiveDocument.Pages(1).Shapes Set ffNew = .AddShape(Type:=msoShapeOval, _ Left:=0, Top:=0, Width:=200, Height:=90).Fill

With .Item(1).Fill
    If .Type = msoFillTextured And _
            .TextureType = msoTextureUserDefined Then
        ffNew.UserTextured _
            TextureFile:=.<strong>TextureName</strong>
    Else
        ffNew.PresetTextured _
            PresetTexture:=msoTextureGreenMarble
    End If
End With

End With

See Also