Macro to Delete Slides?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a macro that will delete specific slides in a PowerPoint
presentation? For example, if I only wanted to show slides 1, 2, 3, 10, and
20 of a slideshow, is there a macro that could delete the ones I don't want
to show?
 
It wouldnt be hard to produce one but its probably easier to do this.

Slide sorter view
ctrl A (select all)
Slide show > hide slide (hides all slides)
Ctrl click the ones you want to show
slide show > hide slide (unhides just those slides)
 
What John said, but if you are doing it with code, here are some options:

ActivePresentation.Slides(2).Delete

This will delete slide 2. But be careful because the rest of your slides
will be renumberd, so if you know the numbers delete from the end to the
front. That is, in your example, delete slide 20 then slide 10 then slide
3, etc.

Another option is to hide the slides (order shouldn't matter for this
one) so they won't show, but they will still be there.

ActivePresentation.Slides(2).SlideShowTransition.Hidden = msoTrue

hides slide 2.

Finally, you might want to create a custom show (either with or without
code) so all the slides are there, but you can play the show you want
that contains only the slides you want.

--David
--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
Thanks for getting back to us to let us know that it worked.
--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
Back
Top