If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How do I mass update Hyperlinks ?
I have a multipage Visio document with many hyperlinks from
different pages to several other documents. Recently, the files I link to were moved. How do mass update the hyperlinks to correct the file paths contained in the hyperlinks ? |
#2
|
|||
|
|||
How do I mass update Hyperlinks ?
Hi Alan,
the only way out is a macro: here is a sample which iterates through shapes on multiple pages and on multiple layers it checks if the shape has a hyperlink section and if so it deletes the first row and then add a new hyperlink As there are many other scenarios thinkable you have to re-adjust the macro accordingly For instance if you need to drill through the hyperlink section for a specific hyerlink cell you need to use 'CellExists' instead of 'SectionExists'. Check the help section in the VBA editor for correct usage.. sample ======== Public Sub IterateShapes() Dim PagObj As Visio.Page Dim layersObj As Visio.Layers, layerObj As Visio.Layer Dim shpsObj As Visio.Shapes, shpObj As Visio.Shape Dim vsoHlink As Visio.Hyperlink Dim valB As Integer For Each PagObj In ActiveDocument.Pages Set layersObj = PagObj.Layers For Each layerObj In layersObj Set shpsObj = layerObj.Page.Shapes For Each shpObj In shpsObj valB = shpObj.SectionExists(visSectionHyperlink, visExistsLocally) If valB = -1 Then shpObj.Hyperlinks.ItemU("Row_1").Delete End If Set vsoHlink = shpObj.Hyperlinks.Add vsoHlink1.Address = "http://www.mysite.com/" Next Next Next End Sub René "Alan C." Alan wrote in message ... I have a multipage Visio document with many hyperlinks from different pages to several other documents. Recently, the files I link to were moved. How do mass update the hyperlinks to correct the file paths contained in the hyperlinks ? |
Thread Tools | |
Display Modes | |
|
|