Run OnLoad macro in PPT

M

Martin Seelhofer

Hi there

You can name a macro Auto_Open (runs when the ppt-file is loaded)
or Auto_Close (runs when the ppt is closed), but I think that there is no
possibility to run a macro on startup of Powerpoint itself. I think
that PowerPoint does not provide the kind of Add-In functionality
that Word does (global templates saved in the startup folder). Therefore,
PowerPoint does not recognize AutoExec- or Auto_Exec-Macros...


Cheers,

Martin
 
F

FredrikT

Ok, I want to start a macro when a ppt-file is loaded, but
it is not working. When I click on Visual Basic Editor in
the ppt-file, there is no where to enter code. So what I
did is create a new module (Module1) and enter the macro
there (Sub Auto_Open()). Is that the correct way?
 
M

Martin Seelhofer

Hello again
Ok, I want to start a macro when a ppt-file is loaded, but
it is not working. When I click on Visual Basic Editor in
the ppt-file, there is no where to enter code. So what I
did is create a new module (Module1) and enter the macro
there (Sub Auto_Open()). Is that the correct way?

Yes, from my point of view, it is.


Cheers,

Martin
 
T

Tushar Mehta

Yes, put the Auto_Open and _Close subs in a standard module. However,
PP doesn't trigger the Auto_ procedures in a regular PP file. You must
create an add-in -- File | Save As... | set file type to PowerPoint
Add-In (.ppa) -- and load it through Tools | Add-Ins... Make sure you
keep a copy of the original saved as a regular PP file (i.e., with a
..pps extension).

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 

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