Created
August 2, 2018 12:13
-
-
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?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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