Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Powerpoint Delete Module 1

Status
Not open for further replies.

LGMan

MIS
Aug 27, 2003
233
GB
Hi, I have a 32 slide Powerpoint which uses links to various ranges on an Excel workbook. Everytime I open the PP presentation and have updated the links, I run a macro which saves the file to a new name (and protects my Master) and removes the links, so it's ready to be emailed out.
I'd also like to remove Module 1 if it's possible within the code.
Any takers?

Many Thanks
 
Hi,

you can use:

Code:
Set vbComp = Application.VBE.ActiveVBProject.VBComponents
vbComp.Remove VBComponent:=vbComp.Item("Module1")

Depending on version of Office you may need to change trust settings.

Regards, Graham

There are two ways to write error-free programs; only the third one works.
 
Thanks for the help, just had to google the trust bit and make the changes
 
Rather than saving your new presentation as a .pptm (macro enabled), save as a *.pptx.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top