Supercharge your PowerPoint productivity with

Supercharge your PPT Productivity with PPTools - Click here to learn more.

Tell me about PPTools

How can I get my code to run automatically when a presentation opens?


PPTools
Shape Styles brings the power of styles to PowerPoint. Apply complex formatting with a single click
Merge Excel, CSV or tab-delimited data into PowerPoint presentations to create certificates, awards presentations, personalized presentations and more
FixLinks prevents broken links when you distribute PowerPoint presentations
Optimizer saves disk space and bandwidth, shrinks your PowerPoint presentations to the right size for email, screenshow or printing
PPT2HTML gives you full control of PowerPoint HTML output, helps meet Section 508 accessibility requirements
Prep4PDF preserves interactivity in PowerPoint presentations when you convert to PDF
Image Export converts PowerPoint slides to JPG, PNG, GIF, WMF and more

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.

Make PPT respond to events

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.


Page copy protected against web site content infringement by Copyscape Contents © 1995-2008 Stephen Rindsberg, Rindsberg Photography, Inc. and members of the MS PowerPoint MVP team. You may link to this page but any form of unauthorized reproduction of this page's contents is expressly forbidden.

Español    Deutsch    Français    Português    Italiano    Nederlands    Greek    Japanese    Korean    Chinese



Supercharge your PPT Productivity with PPTools


content authoring & site maintenance by
Friday, the automatic faq maker (logo)
Friday - The Automatic FAQ Maker

How can I get my code to run automatically when a presentation opens?
http://www.pptfaq.com/FAQ00741.htm
Last update 30 July, 2008