Ungroup every MSGraph chart in a presentation
Problem
You want to ungroup all of the charts in a presentation (perhaps in order to remove the data behind the graphs, leaving just a picture).
Solution
This macro will do the job in seconds:
Sub UngroupCharts()
' Note: this will only work on MSGraph charts, not Excel charts
' it won't work in PPT 2007
Dim oSh As Shape
Dim oSl As Slide
Dim x As Long
For Each oSl In ActivePresentation.Slides
For x = oSl.Shapes.Count To 1 Step -1
Set oSh = oSl.Shapes(x)
' is it an embedded object?
If oSh.Type = msoEmbeddedOLEObject Then
' is it a graph?
If InStr(oSh.OLEFormat.ProgID, "MSGraph") > 0 Then
' ungroup it
oSh.Ungroup
End If
End If
Next
Next
End Sub
See How do I use VBA code in PowerPoint? to learn how to use this example code.