Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Diagram Property

Office 2003

Returns a Diagram object to which a diagram node belongs.

expression.Diagram

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

Example

The following example adds a diagram to a slide.

Sub AddADiagram()

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

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

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

    'Automatically formats the diagram
    dgnNode.Diagram.AutoFormat = msoTrue

End Sub
		




Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.