okay, figured out the Hyperlinks (because there could be multiple, I had to do a loop), now the comments, which are the most important
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 Hyperlink 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.Hyperlinks Entry = vShape.Text Entry = Entry + "," + vShape.Type Entry = Entry + "," + vShapeLinkDes ' Loop through the shape hyperlinks For Each vShapeLink In vShape.Hyperlinks Entry = Entry + "," + vShape.Hyperlinks.Item(0).Description + "," + vShape.Hyperlinks.Item(0).Address Next vShapeLink Entry = Entry + "," + vShape.Comments Write #2, Entry End If Next Shape End Sub




Reply With Quote
