Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-20-2010, 02:09 PM
chinkygogo chinkygogo is offline vba for point of connection in a shape Windows XP vba for point of connection in a shape Office 97
Novice
vba for point of connection in a shape
 
Join Date: Dec 2010
Posts: 2
chinkygogo is on a distinguished road
Default vba for point of connection in a shape

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
Reply With Quote
  #2  
Old 12-22-2010, 07:51 AM
jsmath22 jsmath22 is offline vba for point of connection in a shape Windows XP vba for point of connection in a shape 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
  #3  
Old 01-03-2011, 03:40 AM
chinkygogo chinkygogo is offline vba for point of connection in a shape Windows XP vba for point of connection in a shape Office 97
Novice
vba for point of connection in a shape
 
Join Date: Dec 2010
Posts: 2
chinkygogo is on a distinguished road
Default

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
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom shape in charts? gilezajner PowerPoint 0 12-15-2010 02:21 AM
vba for point of connection in a shape Shape Objects 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
vba for point of connection in a shape Auto Shape Conversion Launchnet Excel 1 04-18-2006 06:25 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:52 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft