Share via


DiagramNode Object

DiagramNode Object
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.


Aa201138.parchild(en-us,office.10).gifDiagramNode
Aa201138.space(en-us,office.10).gifAa201138.parchild(en-us,office.10).gif

Represents a node in a diagram.

Using the DiagramNode object

To return a DiagramNode object, use one of the following:

A diagram node can terminate, or contain other child diagrams, child diagram nodes, or child shapes:

Use the AddNode method to add a node to a diagram or to a diagram node. This example assumes the third shape in the active presentation is a diagram and adds a node to it.

  Sub AddDiagramNode()
    ActivePresentation.Shapes(3).DiagramNode.Children.AddNode
End Sub

Use the Delete method to remove a node from a diagram or diagram node. This example assumes the second shape in the presentation is a diagram and removes the first node from it.

  Sub DeleteDiagramNode()
    ActivePresentation.Shapes(2).DiagramNode.Children(1).Delete
End Sub