ateneva
8/2/2018 - 12:09 PM

How do I only delete certain slides in a presentation?

How do I only delete certain slides in a presentation?

Sub Delete_Slides_on_SlideIDs()

Dim Ppres As Presentation
Set Ppres = ActivePresentation

Dim Sh As Shape
Dim i As Integer
Dim PPS As Slide
'******************************************************
'used in Delivery Reviews
For Each PPS In Ppres.Slides

If PPS.SlideID <> 1651 And PPS.SlideID <> 1543 And PPS.SlideID <> 1711 _
    And PPS.SlideID <> 1683 And PPS.SlideID <> 1684 _
    And PPS.SlideID <> 1439 And PPS.SlideID <> 1433 And PPS.SlideID <> 1440 _
    And PPS.SlideID <> 1434 And PPS.SlideID <> 1442 And PPS.SlideID <> 1441 _
    And PPS.SlideID <> 1502 And PPS.SlideID <> 1435 And PPS.SlideID <> 1436 _
    And PPS.SlideID <> 1437 And PPS.SlideID <> 1438 Then PPS.Delete

Next PPS

End Sub