automation - saving a copy of a ppt without the macros

M

mstuehler

All,

I have a Powerpoint that contains a number of macros. I'm trying to write a
vba/vbascript that will save a COPY of the powerpoint (perhaps using SaveAs),
so that the copy does not contain the macros in the original document.

Many thanks in advance for any help or advice!

Cheers,
Matt Stuehler
 
D

David M. Marcovitz

To do it without VBA, you would set your macro settings to High or Medium and
open the presentation, saying Disable Macros if asked. However, VBA cannot
set the security level. Another way to do this with VBA would be to create a
new presentation and copy the slides to that new presentation (VBA should be
able to do that easily). The macros shouldn't be copied over with the slides.
--David

David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
C

Chirag

You can use SaveAs to make a copy of the presentation. Run the following
macro on the newly created presentation to remove all macros from it:

---
Sub RemoveAllMacros(ByVal Pres As Presentation)
With Pres.VBProject.VBComponents
Do While .Count > 0
.Remove .Item(1)
Loop
End With
End Sub
---

- Chirag

PowerShow - View multiple shows simultaneously
http://officeone.mvps.org/powershow/powershow.html
 

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