Skip to content

Latest commit

 

History

History
86 lines (58 loc) · 2.67 KB

Publisher.ShapeNodes.md

File metadata and controls

86 lines (58 loc) · 2.67 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
ShapeNodes object (Publisher)
vbapb10.chm3538943
vbapb10.chm3538943
Publisher.ShapeNodes
f190a8a8-e03a-e8a2-482a-5e092ff3ed86
06/01/2019
medium

ShapeNodes object (Publisher)

A collection of all the ShapeNode objects in the specified freeform. Each ShapeNode object represents either a node between segments in a freeform or a control point for a curved segment of a freeform.

You can create a freeform manually or by using the Shapes.BuildFreeform and FreeformBuilder.ConvertToShape methods.

Remarks

Use the Nodes property to return a ShapeNodes collection. Use Nodes (index), where index is the node index number, to return a single ShapeNode object.

Use the Insert method to create a new node and add it to the ShapeNodes collection.

Example

The following example deletes node four in shape three on the active document. For this example to work, shape three must be a freeform with at least four nodes.

Sub DeleteShapeNode() 
 ActiveDocument.Pages(1).Shapes(3).Nodes.Delete Index:=4 
End Sub

The following example adds a smooth node with a curved segment after node four in shape three on the active document. For this example to work, shape three must be a freeform with at least four nodes.

Sub AddCurvedSmoothSegment() 
 ActiveDocument.Pages(1).Shapes(3).Nodes.Insert _ 
 Index:=4, SegmentType:=msoSegmentCurve, _ 
 EditingType:=msoEditingSmooth, X1:=210, Y1:=100 
End Sub

If node one in shape three on the active document is a corner point, the following example makes it a smooth point. For this example to work, shape three must be a freeform.

Sub SetPointType() 
 With ActiveDocument.Pages(1).Shapes(3) 
 If .Nodes(1).EditingType = msoEditingCorner Then 
 .Nodes.SetEditingType Index:=1, EditingType:=msoEditingSmooth 
 End If 
 End With 
End Sub

Methods

Properties

See also

[!includeSupport and feedback]