Application.SmartArtColors 属性 (Word)

返回 SmartArtColors 对象,该对象代表应用程序中当前加载的颜色样式集。 此为只读属性。

语法

expressionSmartArtColors

表达 返回“Application”对象的表达式。

备注

SmartArtColors 属性表示的颜色集对应于 Word 中 SmartArt 工具上下文选项卡上“设计”选项卡上的“更改颜色”按钮上的可用颜色样式。

示例

下面的代码示例向活动文档中添加 SmartArt 图形,然后将该 SmartArt 图形颜色设置为“深色 2 轮廓”。

Dim myShape As Shape 
Dim mySmartArt As SmartArt 
 
Set myShape = ActiveDocument.Shapes.AddSmartArt(Application.SmartArtLayouts(1), 50, 50, 200, 200) 
Set mySmartArt = myShape.SmartArt 
 
mySmartArt.Color = Application.SmartArtColors(2) 

另请参阅

Application 对象

支持和反馈

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