How can I get my code to run automatically when a presentation opens?
Problem
You have some neat macros that you want to run automatically whenever you or anyone else opens your presentation or when PowerPoint starts up. How do you make that happen?
You can't. PowerPoint has no way to run code automatically when the user opens a document file.
If you want code to run when PowerPoint opens, you can create an add-in and install it. If the add-in includes a Sub Auto_Open() routine, the code in that routine will run when the add-in loads.
Create an ADD-IN with TOOLBARS that run macros
Your add-in can also respond to events (like Presentation Open) so you can have it run code when a presentation's opened or closed or printed etc.
If an add-in isn't in the cards, there's another dodge that may help if you're trying to get code in a Slide Show (PPS) to run:
Start your presentation with a simple intro-type slide that includes a Click Here button of some sort.
Set the button's Action Setting to Run Macro and select the subroutine you want it to run.
The subroutine should include a line like:
ActivePresentation.SlideShowWindow.View.GotoSlide (2)
This will advance the presentation to slide 2.
Set the presentation to Kiosk mode and include any other navigation buttons a user will need to view the presentation.