View Single Post
 
Old 08-14-2018, 03:19 PM
macareno macareno is offline Windows 10 Office 2010 64bit
Novice
 
Join Date: Jun 2018
Location: Mexico
Posts: 4
macareno is on a distinguished road
Exclamation

Now iam in the same situation but in this time is an Excel File with hundred of weblinks, how or what would be the macro to change in one hit?

Thanks in advance

Quote:
Originally Posted by JohnWilson View Post
This is just off the top of my head and untested so use with caution on a copy. Obviously change the server addresses.

Code:
Sub changeLinks()

Dim ohl As Hyperlink
Dim osld As Slide
Const serverold As String = "http://www.technologytrish.co.uk"
Const servernew As String = "http://www.whatever.com"
For Each osld In ActivePresentation.Slides
For Each ohl In ActivePresentation.Slides(1).Hyperlinks
If ohl.Address Like serverold & "*" & ".pdf" Then
ohl.Address = Replace(ohl.Address, serverold, servernew)
End If
Next ohl
Next osld
End Sub
Reply With Quote