Show AllShow All

AddNodes Method

expression.AddNodes(SegmentType, EditingType, X1, Y1, X2, Y2, X3, Y3)

expression    Required. An expression that returns one of the objects in the Applies To list.

SegmentType   Required MsoSegmentType. The type of segment to be added.

EditingType   Required MsoEditingType. The editing property of the vertex.

X1   Required Single.

Y1   Required Single.

X2   Optional Variant.

Y2   Optional Variant.

X3   Optional Variant.

Y3   Optional Variant.

Example

This example adds a freeform with four segments to myDocument.

Set myDocument = Worksheets(1)
With myDocument.Shapes.BuildFreeform(msoEditingCorner, 360, 200)
    .AddNodes msoSegmentCurve, msoEditingCorner, _
        380, 230, 400, 250, 450, 300
    .AddNodes msoSegmentCurve, msoEditingAuto, 480, 200
    .AddNodes msoSegmentLine, msoEditingAuto, 480, 400
    .AddNodes msoSegmentLine, msoEditingAuto, 360, 200
    .ConvertToShape
End With