Word) (FillFormat.Pattern 属性

返回或设置一个 常量,代表应用于指定的填充对象或线条的图案。 此为只读属性。

语法

表达式模式

表达 返回 FillFormat 对象的表达式。

示例

本示例向 myDocument 添加一个矩形,并将其填充图案设置为与名为“rect1”的形状匹配。新矩形的图案与“rect1”相同,但颜色不一定相同。 在模式中使用的颜色与 背景颜色前景颜色 属性设置。

Set myDocument = ActiveDocument 
With myDocument.Shapes 
 pattern1 = .Item("rect1").Fill.Pattern 
 With .AddShape(msoShapeRectangle, 100, 100, 120, 80).Fill 
 .ForeColor.RGB = RGB(128, 0, 0) 
 .BackColor.RGB = RGB(0, 0, 255) 
 .Patterned pattern1 
 End With 
End With

另请参阅

对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。