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.

MsoSegmentType

MsoSegmentType can be one of these MsoSegmentType constants.
msoSegmentLine
msoSegmentCurve

MsoEditingType

MsoEditingType can be one of these MsoEditingType constants.
msoEditingAuto
msoEditingCorner
Cannot be msoEditingSmooth or msoEditingSymmetric

If SegmentType is msoSegmentLine, EditingType must be msoEditingAuto.

Single

If the EditingType of the new segment is msoEditingAuto, this argument specifies the horizontal distance (in points) from the upper-left corner of the document to the end point of the new segment.

If the EditingType of the new node is msoEditingCorner, this argument specifies the horizontal distance (in points) from the upper-left corner of the document to the first control point for the new segment.

Single

If the EditingType of the new segment is msoEditingAuto, this argument specifies the horizontal distance (in points) from the upper-left corner of the document to the end point of the new segment.

If the EditingType of the new node is msoEditingCorner, this argument specifies the horizontal distance (in points) from the upper-left corner of the document to the first control point for the new segment.

Variant

If the EditingType of the new segment is msoEditingCorner, this argument specifies the horizontal distance (in points) from the upper-left corner of the document to the second control point for the new segment.

If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument.

Variant

If the EditingType of the new segment is msoEditingCorner, this argument specifies the horizontal distance (in points) from the upper-left corner of the document to the second control point for the new segment.

If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument.

Variant

If the EditingType of the new segment is msoEditingCorner, this argument specifies the horizontal distance (in points) from the upper-left corner of the document to the end point of the new segment.

If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument.

Variant

If the EditingType of the new segment is msoEditingCorner, this argument specifies the vertical distance (in points) from the upper-left corner of the document to the end point of the new segment.

If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument.

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