Replace Hyperlinks in large amount of slides

  • Thread starter Thread starter Juergen Friedl
  • Start date Start date
J

Juergen Friedl

Dear All,

I do have several ppt's with a large no. of hyperlinks in the slides to the
same URL. Now this URL has changed. Does anybody know of a way changing
those hyperlinks automatically?

Any help greatly appreciated

kind regards
Juergen
 
Hello Juergen,
All these URL's internet based? You can use the following code to change a
url to a new one.
' -------------------------
Sub ChangeURL()
Dim oSld As Slide
Dim I As Integer

' Enter the exact old URL
Const OLD_URL = "http://www.mvps.org/skp/"
Const NEW_URL = "http://mvps.org/skp/"

For Each oSld In ActivePresentation.Slides
For I = 1 To oSld.Hyperlinks.Count
If oSld.Hyperlinks(I).Address = OLD_URL Then
oSld.Hyperlinks(I).Address = NEW_URL
End If
Next I
Next oSld

End Sub
' -------------------------
 
Back
Top