Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vba, visio objects and links (arrow things) 1

Status
Not open for further replies.

mrmovie

Technical User
Oct 2, 2002
3,094
GB
has anyone got any experience with reading visio files and being able to read through the objects on the sheet in an ordered manor and being able to tell the difference between the links between the objects (i.e. direction of links and also the formatting of that link)? i want to read this info into memory and use it for some admin tasks and i am hoping to use different styles/formats of links to mean different things...as well as direction..
i am looking for some vba code

thanks for any advice
mrmovie
 
Use the Shapes collection and the OneD property (True for lines and connectors). With a Command button and an arbitrary number of other objects on a document this should get you started:
Code:
Private Sub CommandButton1_Click()
Dim s As Shape
  For Each s In ThisDocument.Pages(1).Shapes
   If s.OneD Then
   MsgBox s.Name & " It's a line"
  Else
   MsgBox s.Name & " isn't a line"
   End If
   Next s
End Sub

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top