I am trying to export shape data from my Visio flowchart. I am hoping to get the shape displayed text, shape number, associated hyperlink description, associated hyperlink address, and the associated comment. I would also be nice to know, if possible, what swimlane function the shape sites in. I also don't want OneD shape, and I only want the flowchart shapes. I figured out the OneD, but not flowchart only shapes. The Shape Report on in Visio doesn't allow me to select the fields I want for output. I created the code below, but can only get the shape text. I split them out so I could try each one. After a few hours, I have given up. Any suggestions?
Sub ShapeInfoToFile()
Dim strPath As String
strPath = "C:\Users\collinsp\Documents\SSC\Chief Technical Officer\Enterprise Architecture\E2E Architecture Working Group\Process"
Dim MyFile As String
MyFile = strPath & "\E2EArchWG Visio Report"
Open MyFile For Output As #2
Dim vPage As Visio.Page
Dim vShape As Visio.Shape
Dim vShapeLinkDes As String
Dim vShapeLink As String
Dim Entry As String
Set vPage = Visio.ActivePage
'Loop through shapes creating a string containing them all, writing to file
For Each Shape In vPage.Shapes
Set vShape = Shape
If Not vShape.OneD Then
Set vShapeLinkDes = vShape.Hyperlink.Description.Value
Set vShapeLink = vShape.Hyperlink.Address.Value
Entry = vShape.Text
' Entry = Entry + "," + vShape.Type
Entry = Entry + "," + vShapeLinkDes
Entry = Entry + "," + vShapeLink
' Entry = Entry + "," + vShape.Comments
Write #2, Entry
End If
Next Shape
End Sub