I have a PowerPoint deck with 60+ OLE/ActiveX/.Net linked Excel charts. I want to change the name/location of the Excel file. PowerPoint 2013 handles this very poorly. You have to go to File/Edit Links to Files and edit each link individually.

Here’s how to do this in VBA:

' *************************************************************************************
' You'll have to edit this function any time you want to rename your linked Excel file.
' *************************************************************************************
Function TransformLinkedFilename(ByVal sourceName As String) As String
' Today, I am renaming all .xlsx to .xlsm
' Astonishingly, the file name appears more than once in the source name, so you
' have to let the Replace replace multiple times.
TransformLinkedFilename = Replace(sourceName, ".xlsx", ".xlsm", 1, -1)
End Function

' *************************************************************************************
' I have a PowerPoint with a million OLE linked charts in it.
' The GUI method for doing this is labor intensive.
' *************************************************************************************
Dim aSlide As Slide
Dim aShape As Shape
Dim oldName As String
Dim newName As String

For Each aSlide In ActivePresentation.Slides
For Each aShape In aSlide.Shapes
If (aShape.Type = msoLinkedOLEObject)  Or (aShape.Type = msoChart) Then