UserTextured Method

Microsoft Word Visual Basic

Fills the specified shape with small tiles of an image. If you want to fill the shape with one large image, use the UserPicture method.

expression.UserTextured(TextureFile)

expression    Required. An expression that returns a FillFormat object.

TextureFile    Required String. The name of the picture file.

Example

This example adds two rectangles to the active document. The rectangle on the left is filled with one large image of the picture in Tiles.bmp; the rectangle on the right is filled with many small tiles of the picture in Tiles.bmp

Sub Texture()
    With ActiveDocument.Shapes
        .AddShape(msoShapeRectangle, 0, 0, 200, 100).Fill _
            .UserPicture "C:\Windows\Tiles.bmp"
        .AddShape(msoShapeRectangle, 300, 0, 200, 100).Fill _
            .UserTextured "C:\Windows\Tiles.bmp"
    End With
End Sub