Children Property

Microsoft PowerPoint Visual Basic

object that represents all of the children of the specified diagram node.

expression.Children

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

The following example creates a pyramid diagram and adds child nodes to it.

Sub CreatePyramidDiagram()

    Dim dgnNode As DiagramNode
    Dim shpDiagram As Shape
    Dim intNodes As Integer

    'Adds pyramid diagram and first child node
    Set shpDiagram = ActivePresentation.Slides(1).Shapes _
        .AddDiagram(Type:=msoDiagramPyramid, Left:=10, _
        Top:=15, Width:=400, Height:=475)
    Set dgnNode = shpDiagram.DiagramNode.Children.AddNode

    'Adds three additional child nodes to diagram
    For intNodes = 1 To 3
        dgnNode.AddNode
    Next intNodes

End Sub