Application.SmartArtColors 属性 (Word)
返回 SmartArtColors 对象,该对象代表应用程序中当前加载的颜色样式集。 此为只读属性。
语法
expression。 SmartArtColors
表达 返回“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)
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈