Here is my macro. I think you actually helped me get it working last time. It
was named Template Deck.ppt, I renamed it to Project Legion 3-8-07.ppt. Does
it look like the name could be the problem? Also, the excel file this ppt has
links to was renamed in the same way and they were saved together in a folder
on another drive. They went from a shared drive to the C: drive on my
computer.
Sub HyperLinkSearchReplace()
'
'
Dim oSl As Slide
Dim oHl As Hyperlink
Dim sSearchFor As String
Dim sReplaceWith As String
Dim oSh As Shape
sSearchFor = InputBox("What text should I search for?", "Search for ...")
If sSearchFor = "" Then
Exit Sub
End If
sReplaceWith = InputBox("What text should I replace" & vbCrLf _
& sSearchFor & vbCrLf _
& "with?", "Replace with ...")
If sReplaceWith = "" Then
Exit Sub
End If
For Each oSl In ActivePresentation.Slides
For Each oHl In oSl.Hyperlinks
oHl.Address = Replace(oHl.Address, sSearchFor, sReplaceWith)
oHl.SubAddress = Replace(oHl.SubAddress, sSearchFor, sReplaceWith)
Next ' hyperlink
' and thanks to an astute user on the PPT Newsgroup, lets fix OLE
links too
For Each oSh In oSl.Shapes
If oSh.Type = msoLinkedOLEObject Then
oSh.LinkFormat.SourceFullName = _
Replace(oSh.LinkFormat.SourceFullName, _
sSearchFor, sReplaceWith)
End If
Next
Next ' slide
End Sub