How to Bulk Change Source Links?
<p>Trying to change the Excel source file for charts and objects linked in a PowerPoint deck.</p>
<p>I found this:</p>
<pre class="lang-vb prettyprint-override"><code>Sub ChangeOLELinks()

    Dim oSld As Slide
    Dim oSh As Shape
    Dim sOldPath As String
    Dim sNewPath As String
  
    ' EDIT THIS TO REFLECT THE PATHS YOU WANT TO CHANGE
    sOldPath = InputBox(&quot;Enter Old Project ie: \Development\&quot;, &quot;Old Path&quot;) 
    sNewPath = InputBox(&quot;Enter New Project ie: \Test\&quot;, &quot;New Path&quot;) 
     
    On Error GoTo ErrorHandler

    For Each oSld In ActivePresentation.Slides
        For Each oSh In oSld.Shapes
            If oSh.Type = msoLinkedOLEObject Then
            
                Dim stringPath   As String
                stringPath = Replace(oSh.LinkFormat.SourceFullName, sOldPath, sNewPath, 1, , vbTextCompare)
               
                oSh.LinkFormat.SourceFullName = stringPath
               ' set update mode to auto and update then set it back to manual
                oSh.LinkFormat.AutoUpdate = ppUpdateOptionAutomatic
                oSh.LinkFormat.Update
                oSh.LinkFormat.AutoUpdate = ppUpdateOptionManual
                               
            End If
        Next oSh
    Next oSld
    ActivePresentation.Save

    MsgBox (&quot;Done!&quot;)
    
NormalExit:
    Exit Sub
        
ErrorHandler:
    MsgBox (&quot;Error &quot; &amp; Err.Number &amp; vbCrLf &amp; Err.Description)
    Resume NormalExit
    
End Sub
</code></pre>
<p>This works for OLE objects/links. It isn't updating any of the linked charts.</p>
<p>How can I include charts?</p>