Shapes.AddPolyline Method
Publisher Developer Reference |
Adds a new Shape object representing an open polyline or a closed polygon to the specified Shapes collection.
Syntax
expression.AddPolyline(SafeArrayOfPoints)
expression A variable that represents a Shapes object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
SafeArrayOfPoints | Required | Variant | An array of coordinate pairs that specifies the polyline's or polygon's vertices. |
Return Value
Shape
Remarks
For the array elements in SafeArrayOfPoints, numeric values are evaluated in points; strings can be in any units supported by Microsoft Office Publisher (for example, "2.5 in").
To form a closed polygon, assign the same coordinates to the first and last vertices in the polyline drawing.
Example
The following example adds a triangle to the first page of the active publication. Because the first and last points have the same coordinates, the polygon is closed.
Visual Basic for Applications |
---|
|
See Also