ShapeNodes Interface

A collection of all the ShapeNode objects in the specified freeform.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
<GuidAttribute("91493486-5A91-11CF-8700-00AA0060263B")> _
Public Interface ShapeNodes _
    Inherits IEnumerable
'Usage
Dim instance As ShapeNodes
[GuidAttribute("91493486-5A91-11CF-8700-00AA0060263B")]
public interface ShapeNodes : IEnumerable

Remarks

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 BuildFreeform(MsoEditingType, Single, Single) and ConvertToShape() methods.

Examples

Use the Nodes property to return the ShapeNodes collection. The following example deletes node four in shape three on myDocument. For this example to work, shape three must be a freeform with at least four nodes.

Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(3).Nodes.Delete 4

Use the Insert(String) method to create a new node and add it to the ShapeNodes collection. The following example adds a smooth node with a curved segment after node four in shape three on myDocument. For this example to work, shape three must be a freeform with at least four nodes.

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Nodes

    .Insert 4, msoSegmentCurve, msoEditingSmooth, 210, 100

End With

Use Nodes(index), where index is the node index number, to return a single ShapeNode object. If node one in shape three on myDocument is a corner point, the following example makes it a smooth point. For this example to work, shape three must be a freeform.

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3)

    If .Nodes(1).EditingType = msoEditingCorner Then

        .Nodes.SetEditingType 1, msoEditingSmooth

    End If

End With

See Also

Reference

ShapeNodes Members

Microsoft.Office.Interop.PowerPoint Namespace