Sub
EditPowerPointLinks()
Dim
oldFilePath
As
String
Dim
newFilePath
As
String
Dim
pptPresentation
As
Presentation
Dim
pptSlide
As
Slide
Dim
pptShape
As
Shape
oldFilePath =
"Pfad\\Zu\\Excel\\Datei.xlsx"
newFilePath =
"Pfad\\Zu\\Neuer\\Excel\\Datei.xlsx"
Set
pptPresentation = ActivePresentation
For
Each
pptSlide
In
pptPresentation.Slides
For
Each
pptShape
In
pptSlide.Shapes
If
pptShape.Type = msoLinkedPicture
Or
pptShape.Type = msoLinkedOLEObject
Or
pptShape.Type = msoLinkedChart
Then
pptShape.LinkFormat.SourceFullName = Replace(LCase(pptShape.LinkFormat.SourceFullName), LCase(oldFilePath), newFilePath)
End
If
Next
Next
pptPresentation.UpdateLinks
End
Sub