Skip to content

Latest commit

 

History

History
74 lines (49 loc) · 3.79 KB

PowerPoint.ShapeNodes.Insert.md

File metadata and controls

74 lines (49 loc) · 3.79 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
ShapeNodes.Insert method (PowerPoint)
vbapp10.chm560006
vbapp10.chm560006
PowerPoint.ShapeNodes.Insert
ece6e886-db56-6800-fe1c-f9d308104d75
06/08/2017
medium

ShapeNodes.Insert method (PowerPoint)

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

Name Required/Optional Data type Description
Index Required Long The node that the new node is to be inserted after.
SegmentType Required MsoSegmentType The type of segment to be added.
EditingType Required MsoEditingType The editing property of the vertex.
X1 Required 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 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.
Y1 Required Single If 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.
X2 Optional Single 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.
Y2 Optional Single 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 second control point for the new segment. If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument.
X3 Optional Single 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 endpoint of the new segment. If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument.
Y3 Optional Single 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 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

[!includeSupport and feedback]