FillFormat.TextureName property (Word)

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

Syntax

expression.TextureName

expression An expression that returns a FillFormat object.

Remarks

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

Example

This example adds an oval to the active document. If the second shape in the document has a user-defined textured fill, the new oval will have the same fill as shape two. If shape two has any other type of fill, the new oval will have a green marble fill. This example assumes that the active document already has at least two shapes.

With ActiveDocument.Shapes 
 Set newFill = .AddShape(msoShapeOval, 0, 0, 200, 90).Fill 
 With .Item(2).Fill 
 If.TextureType = msoTextureUserDefined Then 
 newFill.UserTextured .TextureName 
 Else 
 newFill.PresetTextured msoTextureGreenMarble 
 End If 
 End With 
End With

See also

FillFormat Object

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.