G
Guest
All,
I've got a PPT in which each slide has a tag that includes a "section" name.
I'd like to write a vbscript that deletes every slide in the deck where the
section tag equals a certain value.
I've tried this:
For Each oSlide In oPres.Slides
If oSlide.Tags("Section") = "SomeValue" Then oSlide.Delete
Next
But it doesn't work as expected, probably because each time you delete a
slide, then the Slides collection changes, which screws up the loop.
Is there a better way to accomplish this?
Cheers,
Matt Stuehler
I've got a PPT in which each slide has a tag that includes a "section" name.
I'd like to write a vbscript that deletes every slide in the deck where the
section tag equals a certain value.
I've tried this:
For Each oSlide In oPres.Slides
If oSlide.Tags("Section") = "SomeValue" Then oSlide.Delete
Next
But it doesn't work as expected, probably because each time you delete a
slide, then the Slides collection changes, which screws up the loop.
Is there a better way to accomplish this?
Cheers,
Matt Stuehler