View Single Post
 
Old 12-22-2010, 07:51 AM
jsmath22 jsmath22 is offline Windows XP Office 2007
Novice
 
Join Date: Nov 2010
Posts: 14
jsmath22 is on a distinguished road
Default

Unfortunately, the flow diagram shapes (I am assuming you are talking about the "Smart Art") are considered to be one entity within PowerPoint so you cannot use VB to individually select an item. What you can do is mimic the flow diagram you wish to use, which does take a bit but all the effects are available to make it look just as cool. Then, if you bring up the selection pane, it will have all the connectors named for you, or you can change the name by clicking on it within the selection pane. Then you can use psuedo code like

if shape.top-connector.top is within some tolerance then
return the name of that connector
end if

Then set up a for loop to go through each connector. For example, you can do this:


Sub identify()
Dim sld As Slide
Dim cnctrs As Shapes
Dim ocnctr As Shape
Set sld = ActivePresentation.Slides(5) 'slide you are using
Set cnctrs = sld.Shapes 'All shapes
For Each ocnctr In cnctrs 'Each Shape

If InStr(ocnctr.Name, "Straight Connector") > 0 Then
reply = MsgBox("You have selected " & ocnctr.Name, vbOKOnly, "Which Connector?")
End If
Next ocnctr
End Sub


Of course, this may defeat the purpose of why you need the macro. If not, if you can provide some more detail, I could probably provide more help.

Hope This Helps,
Math Nerd
Reply With Quote