DiagramNode 属性

       

返回代表图示中某个节点的 DiagramNode 对象。

expression.DiagramNode

expression  必选。该表达式返回“应用于”列表中的对象之一。

示例

本示例向当前演示文稿的第一张幻灯片中添加一个棱锥图。

Sub CreatePyramidDiagram()
    Dim dgnNode As DiagramNode
    Dim shpDiagram As Shape
    Dim intCount As Integer

    'Add pyramid diagram to current document
    Set shpDiagram = ActivePresentation.Slides(1).Shapes _
        .AddDiagram(Type:=msoDiagramPyramid, Left:=10, _
        Top:=15, Width:=400, Height:=475)

    'Add first diagram node child
    Set dgnNode = shpDiagram.DiagramNode.Children.AddNode

    'Add three more diagram child nodes
    For intCount = 1 To 3
        dgnNode.AddNode
    Next intCount
End Sub