![]() |
|
|
|
#1
|
|||
|
|||
|
Hi Guys
Hope some body can help me ![]() I have about 500 power point files, most of them has weblinks that are pointing to other PDF files in a specific web server. All these web links i had made manually ![]() Now the web server adress is going to change (example): OLD) http://domain.com/documents/file.pdf NEW) http://domainnew.com/documents/file.pdf I have seen that may be is possible using a macro, but i need the help and support from the experts like you because iam not an expert. Best regards |
|
#2
|
|||
|
|||
|
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 Last edited by JohnWilson; 06-15-2018 at 03:10 AM. |
|
#3
|
|||
|
|||
|
Thanks a lot
Works so fine, it change all the weblinks in the 1st Slide ![]() I had tested in a power point file with 8 slides, but it change all the weblinks just for the 1st slide, the others 7 remain with the old link How would be to make the same for the rest of the slides? Best regards |
|
#4
|
|||
|
|||
|
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:
|
|
#5
|
|||
|
|||
|
Sorry there's a typo!
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 osld.Hyperlinks If ohl.Address Like serverold & "*" & ".pdf" Then ohl.Address = Replace(ohl.Address, serverold, servernew) End If Next ohl Next osld End Sub |
|
#6
|
|||
|
|||
|
Beautiful ! works and i had resolved my issue
Thanks a lot... (iam lerning so much) |
|
#7
|
|||
|
|||
|
Not really tested but it should look like:
Code:
Sub loop_Links()
Const serverold As String = "http://www.technologytrish.co.uk"
Const servernew As String = "http://www.whatever.com"
Dim lnk As Hyperlink
Dim L As Long
For L = 1 To ActiveWorkbook.Sheets.Count
For Each lnk In Sheets(L).Hyperlinks
If lnk.Address = serverold Or lnk.Address = serverold & "/" Then
Debug.Print lnk.Address & " " & lnk.Range
lnk.Address = Replace(lnk.Address, serverold, servernew)
If LCase(Left(lnk.Range, 4)) = "http" Then
lnk.Range = Replace(lnk.Range, serverold, servernew)
Else
lnk.Range = Replace(lnk.Range, Mid(serverold, 8), Mid(servernew, 8))
End If
End If
Next lnk
Next L
End Sub
Last edited by JohnWilson; 08-19-2018 at 03:46 AM. |
|
| Tags |
| edit, power point, weblink |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MS Power point | Gyroman | PowerPoint | 0 | 08-08-2015 04:59 PM |
| can power point LINK to embedded object in power point ? | johnseito | PowerPoint | 0 | 05-24-2014 04:31 AM |
| Microsoft Power Point 2004 to Office Power Point 2007 | chuff | PowerPoint | 0 | 03-20-2011 01:23 PM |
| Power Point on the Web | Carthalion | PowerPoint | 0 | 03-03-2010 09:59 AM |
| power point | ladonna12 | PowerPoint | 2 | 02-16-2009 09:34 AM |