automation - saving a copy of a ppt without the macros

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

Guest

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
 
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/
 
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
 
Back
Top