Shapes.AddSmartArt Method
Inserts the specified SmartArt graphic into the active document.
Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)
Syntax
'Declaration
Function AddSmartArt ( _
Layout As SmartArtLayout, _
ByRef Left As Object, _
ByRef Top As Object, _
ByRef Width As Object, _
ByRef Height As Object, _
ByRef Anchor As Object _
) As Shape
'Usage
Dim instance As Shapes
Dim Layout As SmartArtLayout
Dim Left As Object
Dim Top As Object
Dim Width As Object
Dim Height As Object
Dim Anchor As Object
Dim returnValue As Shape
returnValue = instance.AddSmartArt(Layout, _
Left, Top, Width, Height, Anchor)
Shape AddSmartArt(
SmartArtLayout Layout,
ref Object Left,
ref Object Top,
ref Object Width,
ref Object Height,
ref Object Anchor
)
Parameters
- Layout
Type: SmartArtLayout
A SmartArtLayout object that specifies the layout for the SmartArt graphic.
- Left
Type: System.Object%
The distance, in points, from the left edge of the slide to the left edge of the SmartArt graphic.
- Top
Type: System.Object%
The distance, in points, from the top edge of the slide to the top edge of the SmartArt graphic.
- Width
Type: System.Object%
The width of the SmartArt graphic.
- Height
Type: System.Object%
The height of the SmartArt graphic.
- Anchor
Type: System.Object%
A Range object that represents the text to which the SmartArt graphic is bound. If Anchor is specified, the anchor is positioned at the beginning of the first paragraph in the anchoring range. If this parameter 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
Type: Microsoft.Office.Interop.Word.Shape
A Shape object.