Table of contents
Collapse the table of content
Expand the table of content

Shapes.AddCurve Method (Publisher)

office 365 dev account|Last Updated: 8/24/2017
3 Contributors

Adds a new Shape object representing a Bézier curve to the specified Shapes collection.


expression. AddCurve( SafeArrayOfPoints)

_expression_A variable that represents a Shapes object.


NameRequired/OptionalData TypeDescription
SafeArrayOfPointsRequiredVariantAn array of coordinate pairs that specifies the vertices and control points of the curve. The first point you specify is the starting vertex, and the next two points are control points for the first Bézier segment. Then, for each additional segment of the curve, you specify a vertex and two control points. The last point you specify is the ending vertex for the curve. Note that you must always specify 3n + 1 points, where n is the number of segments in the curve.

Return Value



For the array elements in SafeArrayOfPoints, numeric values are evaluated in points; strings can be in any units supported by Microsoft Publisher (for example, "2.5 in").


The following example adds a two-segment Bézier curve to the first page of the active publication.

Dim shpCurve As Shape 
Dim arrPoints(1 To 4, 1 To 2) As Single 

arrPoints(1, 1) = 0 
arrPoints(1, 2) = 0 
arrPoints(2, 1) = 72 
arrPoints(2, 2) = 72 
arrPoints(3, 1) = 144 
arrPoints(3, 2) = 36 
arrPoints(4, 1) = 216 
arrPoints(4, 2) = 108 

Set shpCurve = ActiveDocument.Pages(1).Shapes.AddCurve _ 
© 2018 Microsoft