AddSmartArt 方法 (Word)Shapes.AddSmartArt method (Word)

将指定 SmartArt 图形插入活动文档。Inserts the specified SmartArt graphic into the active document.

语法Syntax

expressionexpression. AddSmartArt( _Layout_ , _Left_ , _Top_ , _Width_ , _Height_ , _Anchor_ )

_表达式_一个返回 "Shapes" 对象的表达式。expression An expression that returns a 'Shapes' object.

参数Parameters

名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
LayoutLayout 必需Required [SMARTARTLAYOUT][SMARTARTLAYOUT] 指定 SmartArt 图形的布局的 SmartArtLayout 对象。A SmartArtLayout object that specifies the layout for the SmartArt graphic.
LeftLeft 可选Optional VariantVariant 从幻灯片左边缘到 SmartArt 图形的左边缘之间的距离 (以磅为单位)。The distance, in points, from the left edge of the slide to the left edge of the SmartArt graphic.
TopTop 可选Optional VariantVariant 从幻灯片的上边缘到 SmartArt 图形的上边缘之间的距离 (以磅为单位)。The distance, in points, from the top edge of the slide to the top edge of the SmartArt graphic.
WidthWidth 可选Optional VariantVariant SmartArt 图形的宽度。The width of the SmartArt graphic.
HeightHeight 可选Optional VariantVariant SmartArt 图形的高度。The height of the SmartArt graphic.
AnchorAnchor 可选Optional VariantVariant Range对象,表示该 SmartArt 图形所绑定到的文本。A Range object that represents the text to which the SmartArt graphic is bound. 如果指定了_anchor_ , 锁定标记将位于锁定区域中第一段的开头。If Anchor is specified, the anchor is positioned at the beginning of the first paragraph in the anchoring range. 如果省略此参数,将自动选定锁定区域,SmartArt 图形相对于页面的上部和左侧边缘进行定位。If this argument is omitted, the anchoring range is selected automatically and the SmartArt graphic is positioned relative to the top and left edges of the page.

返回值Return value

ShapeShape

另请参阅See also

Shapes 集合对象Shapes Collection Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.