Skip to content

Instantly share code, notes, and snippets.

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/737f45ca3af8236b45ac23009e9bfcfd to your computer and use it in GitHub Desktop.
Save ateneva/737f45ca3af8236b45ac23009e9bfcfd to your computer and use it in GitHub Desktop.
How do I automatically delete slides based on the content of their header?
Sub Delete_Slides_TextinTitle()
Dim Ppres As Presentation
Set Ppres = ActivePresentation
Dim PPS As Slide
Dim StrNo As Long
Dim Titel As String
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For Each PPS In Ppres.Slides
'slide has a certain text in Slide Title
Titel = PPS.Shapes.Title.TextFrame.TextRange
StrNo = InStr(Titel, "Project")
If StrNo <> 0 Then PPS.Delete
Next PPS
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment