Shape and TextShape of DiagramNode - Is that a BUG ?

G

Guest

With PowerPoint 2003 (Not sure about other versions), when I look at a
diagram node of a diagram, both the Shape property and the TextShape property
of the DiagramNode return the same shape ie the text rectangle. Is that a BUG?

As a result of this, there is no access to the Autoshape from the DiagramNode.
For example, in a circular diagram, how do I get access to the arrows?

All the shapes are accessible in the GroupItems property of the Diagram
shape but there is nothing to help distingish what textbox goes with what
arrow.

Can anyone help?

Thanks
 
S

Shyam Pillai

Marc,
Yes, it's a bug. But you can try the following:

Dim oShp As Shape
Dim I As Integer
' Assuming that the selected shape is a diagram
Set oShp = ActiveWindow.Selection.ShapeRange(1)

' Shapes within an diagram are enumerated as follows:
' Non-textshapes first in clock-wise direction
' Then Text shapes in clock-wise direction
For I = 1 To oShp.GroupItems.Count
Debug.Print oShp.GroupItems(I).Name
If oShp.GroupItems(I).HasTextFrame Then
' Text Shape
Debug.Print oShp.GroupItems(I).TextFrame.TextRange.Text
Else
' Other shape
Call
oShp.GroupItems(I).Fill.TwoColorGradient(msoGradientFromCenter, 1)
End If
Next I
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top