FillFormat.UserPicture method (Word)
Fills the specified shape with one large image.
Syntax
expression.UserPicture (PictureFile)
expression Required. A variable that represents a FillFormat object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
PictureFile | Required | String | The name of the picture file. |
Remarks
If you want to fill the shape with small tiles of an image, use the UserTextured method.
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 Pic()
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
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.