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

ShapeNodes.Insert Method (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Inserts a new segment after the specified node of the freeform.

Syntax

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

expression A variable that represents an ShapeNodes object.

Parameters

NameRequired/OptionalData TypeDescription
IndexRequiredLongThe node that the new node is to be inserted after.
SegmentTypeRequiredMsoSegmentTypeThe type of segment to be added.
EditingTypeRequiredMsoEditingTypeThe editing property of the vertex.
X1RequiredSingleIf 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 endpoint 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.
Y1RequiredSingleIf the EditingType of the new segment is msoEditingAuto, this argument specifies the vertical distance (in points) from the upper-left corner of the document to the endpoint of the new segment. If the EditingType of the new node is msoEditingCorner, this argument specifies the vertical distance (in points) from the upper-left corner of the document to the first control point for the new segment.
X2OptionalSingleIf 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.
Y2OptionalSingleIf 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 second control point for the new segment. If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument.
X3OptionalSingleIf 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 endpoint of the new segment. If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument.
Y3OptionalSingleIf 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 endpoint of the new segment. If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument.

Remarks

The SegmentType parameter value can be one of these MsoSegmentType constants.

|| |:-----| |msoSegmentCurve| |msoSegmentLine| The EditingType parameter value can be one of these MsoEditingType constants.

|| |:-----| |msoEditingAuto| |msoEditingCorner|

Example

This example adds a smooth node with a curved segment after node four in shape three on myDocument. Shape three must be a freeform drawing with at least four nodes.

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Nodes
    .Insert Index:=4, SegmentType:=msoSegmentCurve, _
        EditingType:=msoEditingSmooth, X1:=210, Y1:=100
End With
© 2018 Microsoft