Shapes.AddDiagram(MsoDiagramType, Single, Single, Single, Single, Object) Shapes.AddDiagram(MsoDiagramType, Single, Single, Single, Single, Object) Method

Definition

Returns a Shape object that represents a newly created diagram in a document.

public Microsoft.Office.Interop.Word.Shape AddDiagram (Microsoft.Office.Core.MsoDiagramType Type, float Left, float Top, float Width, float Height, ref object Anchor);
Public Function AddDiagram (Type As MsoDiagramType, Left As Single, Top As Single, Width As Single, Height As Single, Optional ByRef Anchor As Object) As Shape
Parameters
Type
Microsoft.Office.Core.MsoDiagramType Microsoft.Office.Core.MsoDiagramType

Required Microsoft.Office.Core.MsoDiagramType.MsoDiagramType can be one of these constants. msoDiagramCycle – Shows a process with a continuous cycle. msoDiagramMixed – Not used with this method. msoDiagramOrgChart – Shows hierarchical relationships. msoDiagramPyramid – Shows foundation-based relationships. msoDiagramRadial – Shows relationships of a core element. msoDiagramTarget – Shows steps toward a goal. msoDiagramVenn – Shows areas of overlap between elements.

Left
Single Single

Required Single. The position, measured in points, of the left edge of the diagram's bounding box relative to the anchor.

Top
Single Single

Required Single. The position, measured in points, of the top edge of the diagram's bounding box relative to the anchor.

Width
Single Single

Required Single. The width, measured in points, of the diagram's bounding box.

Height
Single Single

Required Single. The height, measured in points, of the diagram's bounding box.

Anchor
Object Object

Optional Object. A Range object that represents the text to which the diagram is bound. If Anchor is specified, the anchor is positioned at the beginning of the first paragraph in the anchoring range. If this argument is omitted, the anchoring range is selected automatically and the diagram is positioned relative to the top and left edges of the page.

Returns

Applies to