Macro to Delete Slides?

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?
 
G

Guest

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)
 
D

David M. Marcovitz

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/
 
D

David M. Marcovitz

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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top