AddPolyline Method

AddPolyline Method

See Also         Example         Applies To

Creates an open polyline or a closed polygon drawing. Returns a Shape object that represents the new polyline or polygon.

Syntax

expression.AddPolyline(SafeArrayOfPoints, Anchor)

expression   Required. An expression that returns a Shapes collection.

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

Anchor   Optional Variant. 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.

Remarks

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