PowerPoint) (FillFormat.Pattern 属性

设置或返回一个值,该值代表应用于指定填充的图案。 只读。

语法

表达式。模式

表达式 表示 FillFormat 对象的变量。

返回值

MsoPatternType

备注

使用 BackColor 和 ForeColor 属性设置在图案中使用的颜色。

示例

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

Set myDocument = ActivePresentation.Slides(1) 
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 支持和反馈,获取有关如何接收支持和提供反馈的指南。