Share via


DiagramNodeChildren Collection

DiagramNodeChildren Collection
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

DiagramNode
Aa201139.parchild(en-us,office.10).gifDiagramNodeChildren
Aa201139.space(en-us,office.10).gifAa201139.parchild(en-us,office.10).gifDiagramNode

A collection of DiagramNode objects that represents child nodes in a diagram.

Using the DiagramNodeChildren collection

Use the Children property of the DiagramNode object to return a DiagamNodeChildren collection. To add an individual child diagram node to the collection, use the AddNode method. To return individual child diagram nodes in the collection, use the **FirstChild**or LastChild  properties or the Item method.

This example deletes the first child of the second node in the first diagram in the document.  This example assumes that the first shape in the active document is a diagram with at least two nodes, one with child nodes.

  Sub DiagramNodeChild()
    ActiveDocument.Shapes(1).Diagram.Nodes.Item(2) _
        .Children.FirstChild.Delete
End Sub