Edit

Share via


Shapes.AddDiagram 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);
abstract member AddDiagram : Microsoft.Office.Core.MsoDiagramType * single * single * single * single * obj -> Microsoft.Office.Interop.Word.Shape
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
MsoDiagramType

Required 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

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

Top
Single

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

Width
Single

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

Height
Single

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

Anchor
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