如果形状是图示节点,则此参数为 MsoTrue。只读。MsoTriState 类型。
| MsoTriState 可以是下列 MsoTriState 类型常数之一。 | 
| msoCTrue 不应用于此属性。 | 
| msoFalse 形状不是图示节点。 | 
| msoTriStateMixed 不应用于此属性。 | 
| msoTriStateToggle 不应用于此属性。 | 
| msoTrue 形状是图示节点。 | 
expression.HasDiagramNode
expression 必选。该表达式返回“应用于”列表中的对象之一。
本示例搜索当前文档以查找带有节点的图示,如果发现带有节点的图示,则创建一个带有白色粗体文字的黑色气球。
Sub HasDiagramProperties()
    Dim shpDiagram As Shape
    Dim shpNode As DiagramNode
    Dim shpBalloon As Shape
    Dim sldFirst As Slide
    Set sldFirst = ActivePresentation.Slides(1)
    'Looks through the current document and when it finds a diagram
    ' with one or more diagram nodes, creates a balloon with text
    For Each shpDiagram In sldFirst.Shapes
        If shpDiagram.HasDiagram = msoTrue And _
            shpDiagram.HasDiagramNode = msoTrue Then
                Set shpBalloon = sldFirst.Shapes.AddShape( _
                    Type:=msoShapeBalloon, Left:=350, _
                    Top:=75, Width:=150, Height:=150)
                With shpBalloon
                    With .TextFrame
                        .WordWrap = msoTrue
                        With .TextRange
                            .Text = "This is a diagram with nodes."
                            .Font.Color.RGB = RGB(Red:=255, _
                                Green:=255, Blue:=255)
                            .Font.Bold = True
                            .Font.Name = "Tahoma"
                            .Font.Size = 15
                        End With
                    End With
                    .Line.BackColor.RGB = RGB( _
                        Red:=0, Green:=25, Blue:=25)
                    .Fill.ForeColor.RGB = RGB( _
                        Red:=0, Green:=25, Blue:=25)
                End With
        End If
    Next shpDiagram
End Sub