Run macro for all documents

  • Thread starter Thread starter Blackstar
  • Start date Start date
B

Blackstar

Hi,

I have to add a custom footer to every powerpoint document based on an
enviromental variable. This isn't a problem I've got the vb/vba code
to do this. My problem is that I'm not really sure where to put it.

No matter what the document is or what template it is based on I need
to run this code. I was wondering if I should put it in PPT10.pcb or
is there somewhere else that is always checked for code?

Also how do I open PPT10.pcb?

If I put it in PPT10.pcb will I also need to put it in any existing
templates that are used?

Thanks
 
Hi,
To make the macro available to all the presentations, you will need to
create an add-in with a menu item to click on to fire the macro to process
the active presentation. Is that what you are looking for? Take a look at
this page: http://skp.mvps.org/ppafaq.htm. Or are you trying to batch
process several presentations simultaneously?

Regards,
Shyam Pillai

Handout Wizard
http://skp.mvps.org/how
 
Basically what I'm trying to do is add a custom footer to the master
slide when the user saves. This needs to be done on every presentation
created and it needs to be done automatically so the button might not
be the best option.

Thanks
 
Blackstar said:
Basically what I'm trying to do is add a custom footer to the master
slide when the user saves. This needs to be done on every presentation
created and it needs to be done automatically so the button might not
be the best option.

Probably not. But you'd still need to put the code in an addin.
The addin would need to include an event handler to trap the event that occurs
when the presentation closes.

Shyam's got a lot of good information about that on his site and there's a link
to it from here:

Make PPT respond to events
http://www.pptfaq.com/FAQ00004.htm
 
That looks like just the ticket. Thanks

Steve said:
Probably not. But you'd still need to put the code in an addin.
The addin would need to include an event handler to trap the event that occurs
when the presentation closes.

Shyam's got a lot of good information about that on his site and there's a link
to it from here:

Make PPT respond to events
http://www.pptfaq.com/FAQ00004.htm




-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
Would an add-in make the code (event handling) avaliable (handled) on
every document created/opened?
 
Would an add-in make the code (event handling) avaliable (handled) on
every document created/opened?

Think of it in terms of the computer rather than the document.

If the addin is installed on the computer and it traps document open/close events,
then the event will fire for all documents (I think there may be some exceptions for
documents that are opened/closed by code, but that doesn't seem to be relevant to
what you want to do, so forget I opened my mouth. Er. Fingers.)

If the addin isn't installed, then ... nada.

Does that help?
 
Back
Top