FillFormat.Pattern 属性 (PowerPoint)
设置或返回一个值,该值代表应用于指定填充的图案。 只读。
语法
表达式。模式
表达 一个代表 FillFormat 对象的变量。
返回值
备注
使用 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 支持和反馈,获取有关如何接收支持和提供反馈的指南。