title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
ShapeNodes.Insert method (Publisher) |
vbapb10.chm3473426 |
|
|
c78ceefe-db9f-4af0-2e76-2ab1e4dc74b8 |
06/14/2019 |
medium |
Inserts a new segment after the specified node of the freeform drawing.
expression.Insert (Index, SegmentType, EditingType, X1, Y1, X2, Y2, X3, Y3)
expression A variable that represents a ShapeNodes object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Index | Required | Long | The number of the node after which the new node is to be inserted. |
SegmentType | Required | MsoSegmentType | The type of segment to be added. Can be one of the MsoSegmentType constants. |
EditingType | Required | MsoEditingType | The editing type of the new node. Can be one of the MsoEditingType constants. |
X1 | Required | Variant | If the EditingType of the new segment is msoEditingAuto, this argument specifies the horizontal distance from the upper-left corner of the page to the endpoint of the new segment. If the EditingType of the new node is msoEditingCorner, this argument specifies the horizontal distance from the upper-left corner of the page to the first control point for the new segment. |
Y1 | Required | Variant | If the EditingType of the new segment is msoEditingAuto, this argument specifies the vertical distance from the upper-left corner of the page to the endpoint of the new segment. If the EditingType of the new node is msoEditingCorner, this argument specifies the vertical distance from the upper-left corner of the page to the first control point for the new segment. |
X2 | Optional | Variant | If the EditingType of the new segment is msoEditingCorner, this argument specifies the horizontal distance from the upper-left corner of the page 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 | Variant | If the EditingType of the new segment is msoEditingCorner, this argument specifies the vertical distance from the upper-left corner of the page 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 | Variant | If the EditingType of the new segment is msoEditingCorner, this argument specifies the horizontal distance from the upper-left corner of the page 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 | Variant | If the EditingType of the new segment is msoEditingCorner, this argument specifies the vertical distance from the upper-left corner of the page to the endpoint of the new segment. If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument. |
For the X1, Y1, X2, Y2, X3, and Y3 arguments, numeric values are evaluated in points; strings can be in any units supported by Publisher (for example, "2.5 in").
This example adds a smooth node with a curved segment after node four in the third shape in the active publication. The shape must be a freeform drawing with at least four nodes.
With ActiveDocument.Pages(1).Shapes(3).Nodes
.Insert Index:=4, _
SegmentType:=msoSegmentCurve, _
EditingType:=msoEditingAuto, _
X1:=210, Y1:=100
End With
[!includeSupport and feedback]