Skip to content

Instantly share code, notes, and snippets.

@ateneva
Created August 2, 2018 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ateneva/21656757f25b7b48f5f8a718683e6e6e to your computer and use it in GitHub Desktop.
Save ateneva/21656757f25b7b48f5f8a718683e6e6e to your computer and use it in GitHub Desktop.
How do I remove certain shape types from a slide with VBA?
Sub Delete_shape_type()
Dim p As Presentation
Set p = ActivePresentation
Dim PPS As Slide
Dim Sh As Shape
'***************************
For Each PPS In p.Slides
For Each Sh In PPS.Shapes
If Sh.Type = msoPicture Then Sh.Delete
If Sh.Type = msoTextBox Then Sh.Delete
If Sh.Type = msoAutoShape Then Sh.Delete
Next Sh
Next PPS
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment