A
arilou
Hello
following quite simple macro shall modify all hyperlinks in the document. Bu
a
lin
Set myLink = arLinks.Item(iLink
it raise
runtime error -2032465751 (86db08a9
Invalid paramete
But I can't see, where I programmed wrong. Google didn't tell much about thi
error either
Sub LinkChanger(
Dim iPage As Intege
Dim arVsoPages As Visio.Page
Dim page As Visio.pag
Dim arShapes As Visio.Shape
Dim iShape As Integer, iLink As Intege
Dim myShape As Visio.Shap
Dim arLinks As Visio.Hyperlink
Dim myLink As Visio.Hyperlin
Dim url As String, urlRight As Strin
Set arVsoPages = ActiveDocument.Page
For iPage = 1 To arVsoPages.Coun
Set page = arVsoPages.Item(iPage
Set arShapes = page.Shape
For iShape = 1 To arShapes.Coun
Set myShape = arShapes.Item(iShape
Set arLinks = myShape.Hyperlink
If arLinks.Count > 0 The
For iLink = 1 To arLinks.Coun
Set myLink = arLinks.Item(iLink
url = myLink.Addres
If Left(url, 2) = "G:" The
urlRight = Right(url, Len(url) - 2
url = "H:" & urlRigh
myLink.Address = ur
End I
Next iLin
End I
Next iShap
Next iPag
End Sub
following quite simple macro shall modify all hyperlinks in the document. Bu
a
lin
Set myLink = arLinks.Item(iLink
it raise
runtime error -2032465751 (86db08a9
Invalid paramete
But I can't see, where I programmed wrong. Google didn't tell much about thi
error either
Sub LinkChanger(
Dim iPage As Intege
Dim arVsoPages As Visio.Page
Dim page As Visio.pag
Dim arShapes As Visio.Shape
Dim iShape As Integer, iLink As Intege
Dim myShape As Visio.Shap
Dim arLinks As Visio.Hyperlink
Dim myLink As Visio.Hyperlin
Dim url As String, urlRight As Strin
Set arVsoPages = ActiveDocument.Page
For iPage = 1 To arVsoPages.Coun
Set page = arVsoPages.Item(iPage
Set arShapes = page.Shape
For iShape = 1 To arShapes.Coun
Set myShape = arShapes.Item(iShape
Set arLinks = myShape.Hyperlink
If arLinks.Count > 0 The
For iLink = 1 To arLinks.Coun
Set myLink = arLinks.Item(iLink
url = myLink.Addres
If Left(url, 2) = "G:" The
urlRight = Right(url, Len(url) - 2
url = "H:" & urlRigh
myLink.Address = ur
End I
Next iLin
End I
Next iShap
Next iPag
End Sub