View Single Post
 
Old 06-15-2018, 12:38 AM
JohnWilson JohnWilson is offline Windows 7 64bit Office 2016
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

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
If you put all the files in a single folder it would be possible to adapt this to change all the presentations in one go. There is sample code on www.pptfaq.com
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials

Last edited by JohnWilson; 06-15-2018 at 03:10 AM.
Reply With Quote