![]() |
#1
|
|||
|
|||
![]()
Hi there,
I am trying to locate the VBA code that specifies what the point of connection is for a given shape. For example, if I have a rectangle (or a process box for the flow diagram shapes) which has 4 points of connection, all of which are connected by connector shapes, is there a function that can return me which connector is connected to the top connector, the bottom one, the left one and the right one? thanks Pete |
#2
|
|||
|
|||
![]()
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 |
#3
|
|||
|
|||
![]()
thanks very much for your reply. I have actually found the answer. I was just using regular shapes, but the property i was looking for was called connectionsite under the connectorformat object.
thanks anyway Pete |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom shape in charts? | gilezajner | PowerPoint | 0 | 12-15-2010 02:21 AM |
![]() |
Space Cowboy | PowerPoint | 4 | 10-04-2010 07:14 PM |
Outlook 2007: The connection to Microsoft Exchange is unavailable ... | Idyll | Outlook | 1 | 11-13-2009 03:32 PM |
Microsoft products unable to see my internet connection | whatagwanagal | Office | 0 | 02-19-2009 01:39 AM |
![]() |
Launchnet | Excel | 1 | 04-18-2006 06:25 AM |