Hi all,
I got a perfectly working VBA macro, but it deletes all shapes on ALL slides in the active PowerPoint.
Sub DeleteAllGraphsInPPT()
'This macro will only work if there is an active PowerPoint
'It removes all shapes, pictures and tables in the active PowerPoint
Dim objApp, objSlide, ObjShp, objTable
On Error Resume Next
'Is the PowerPoint open?
Set objApp = CreateObject("PowerPoint.Application")
On Error GoTo 0
'If the presentation is open, check each slides for shapes, pictures and/or tables
'and deletes them if they exist
For Each objSlide In objApp.ActivePresentation.Slides
For Each ObjShp In objSlide.Shapes
If ObjShp.Type = msoPicture Then
ObjShp.Delete
ElseIf ObjShp.Type = msoTable Then
ObjShp.Delete
ElseIf ObjShp.Type = msoChart Then
ObjShp.Delete
End If
Next
Next
End Sub
Is it possible to modify it and only delete all shapes from slides 2 until 8?
Yours sincerely,
Djani