I found this code in an article and was trying to change it so I could update my ppt links when i put my file on a different drive.
Sub ChangeLinkSources()
Dim i As Integer
Dim k As Integer
Dim linkname As String
OldPath = InputBox(“What is Old path? “)
NewPath = InputBox(“What is New path? “)
For i = 1 To ActivePresentation.Slides.Count
With ActivePresentation.Slides(i)
For k = 1 To .Shapes.Count
With .Shapes(k)
If .Type = msoLinkedOLEObject Then
With .LinkFormat
linkname = .SourceFullName
FinalString = Replace(linkname, OldPath, NewPath)
.SourceFullName = FinalString
.AutoUpdate = ppUpdateOptionAutomatic
End With
End If
End With
Next k
End With
Next i
ActivePresentation.UpdateLinks
End Sub
I keep getting a run-time error -2147467259. Method ‘SourceFullName” of object ‘LinkFormat” failed. What does this mean? I am trying to search for C: and make it M: or some other drive letter. Thank you for any help