FillFormat.TextureName property (Publisher)
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 FillFormat 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.
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:=.TextureName
Else
ffNew.PresetTextured _
PresetTexture:=msoTextureGreenMarble
End If
End With
End With
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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for