Forum Discussion
Edit/Mass Edit Powerpoint linked file addresses
Try this:
- Use Edit Links to Files with multi‑selection for each batch folder.
- If you want pure text‑based editing (e.g., replace D:\Game1\ with E:\Game1\Batch1\), you’ll need a VBA macro or Python script. Microsoft doesn’t provide a native text editor for link paths.
- For 250+ images, scripting is the fastest: loop through all shapes, check .LinkFormat.SourceFullName, and replace the drive/folder prefix.
Replace D:\Game1\... paths with E:\Game1\Batch1\...
Sub BatchReplaceLinks()
Dim sld As Slide
Dim shp As Shape
Dim oldPath As String
Dim newPath As String
' Adjust these to your case
oldPath = "D:\Game1\"
newPath = "E:\Game1\Batch1\"
For Each sld In ActivePresentation.Slides
For Each shp In sld.Shapes
On Error Resume Next
If shp.Type = msoLinkedPicture Or shp.Type = msoPicture Then
If shp.LinkFormat.SourceFullName <> "" Then
If InStr(1, shp.LinkFormat.SourceFullName, oldPath, vbTextCompare) > 0 Then
shp.LinkFormat.SourceFullName = Replace(shp.LinkFormat.SourceFullName, oldPath, newPath)
End If
End If
End If
On Error GoTo 0
Next shp
Next sld
MsgBox "Link replacement complete."
End Sub
Apologies for having been unable to check this for a bit. I tried the macro you gave and it made a decent amount of progress but didn't quite get me over the finish line. Around a quarter of the way through the updates and process it crapped out and stopped updating the links however I don't think it's the fault of the macro, at least not entirely if it is. As time has gone on a couple files have become super unstable and actually crashed out a couple of times where they didn't before. Over the years I've had a few files become at least partially corrupted or bugged out in some way and some of these files have started to behave like those did. So far it seems to just be the ppt files themselves currently but that's easy enough to redo, just tedious.
Anyways I say all that to get to this. The macro got me at least a quarter of the way there so ballpark around 62 of the photos updated as they should. However the remaining 188 or so haven't. It initially updated around 58 of them, then after running the macro again it updated an additional 4 but has since no longer updated. While it sucks having to redo 188 of them, that sucks alot less than the full 250. I think my best bet at this point is to redo the other 188 manually as much as that sucks and then keep the macro in my back pocket incase I ever need it again.
Not sure what protocol is for marking a solution in this instance. I believe the macro would've been perfect if not for potential outlying factors, but it was at least a partial solution. If mods want to advise on this by all means.