Diese Dokumentation wurde archiviert und wird nicht länger gepflegt.

Shapes.AddPolyline Method

Adds an open or closed polygon to a document. Returns a Shape object that represents the polygon and adds it to the Shapes collection.

Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in microsoft.office.interop.word.dll)

Dim SafeArrayOfPoints As Object
Dim Anchor As Object
Dim returnValue As Shape
Dim shapes1 As Shapes
returnValue = shapes1.AddPolyline(SafeArrayOfPoints, Anchor)

Shape AddPolyline(
	[In] ref object SafeArrayOfPoints, 
	[In, Optional] ref object Anchor
public Shape AddPolyline(
	/*in*/System.Object SafeArrayOfPoints, 
	/*in*/System.Object Anchor
function AddPolyline(
	 SafeArrayOfPoints : Object, 
	 Anchor : Object
) : Shape;



Required Object. An array of coordinate pairs that specifies the polyline drawing's vertices.


Optional Object. A Range object that represents the text to which the polyline 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 line is positioned relative to the top and left edges of the page.

To form a closed polygon, assign the same coordinates to the first and last vertices in the polyline drawing.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms