用一张图片的多份影像来填充指定图形。如果想用一张图片的大图像来填充图形,请用 UserPicture 方法。
expression.UserTextured(TextureFile)
expression 必需。返回 FillFormat 对象的表达式。
TextureFile String 类型,必需。图片文件名。
本示例实现的功能是:将两个矩形添至活动文档。左侧的矩形用 Tiles.bmp 图片的一张大图像填充,右侧的矩形用 Tiles.bmp 图片的许多小图像填充。
Sub Texture()
' Windows NT and Windows2000 users need to
' specify a different explicit path to a bitmap
' file in the methods below.
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