A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Visio
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do I mass update Hyperlinks ?



 
 
Thread Tools Display Modes
  #1  
Old January 12th, 2007, 03:40 PM posted to microsoft.public.visio.general
Alan C.
external usenet poster
 
Posts: 1
Default 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  
Old January 15th, 2007, 09:43 AM posted to microsoft.public.visio.general
wr
external usenet poster
 
Posts: 67
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:22 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.