Add code/script/macro to each page/slide of a PPT presentation, so it executes automatically when slide is played/shown

Posted on 2008-11-11
Last Modified: 2012-05-05
1. I need to add code to each page/slide of a PPT presentation, so it executes automatically when slide is played/shown

2. The code will run an executable (a different one for each page).

3. The code can be in the form of VB/VBA/Script/Macro or action button

4. I would appreciate a code sample (the entire thing) since i'm new at this.  

Question by:msjlogicjunction
    LVL 11

    Expert Comment

    have a look at sub OnSlideShowPageChange
    LVL 11

    Accepted Solution

    to add, this code provides the basic structure to run code at each slide
    Sub OnSlideShowPageChange(ByVal SSW As SlideShowWindow)
        Select Case SSW.View.CurrentShowPosition
            Case 1
                MsgBox "at one"
            Case 2
                MsgBox "at two"
            Case 3
                MsgBox "at three"
        End Select
    End Sub

    Open in new window


    Author Closing Comment

    Thanks again.  I posted a variation on this question  ("Run action button automatically...)" since i didn't seem to be getting any hits on the original and really needed a response -  you've answered them both very well. Thanks for the effort.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Introduction In all recent versions of PowerPoint it is possible to trigger animations. This means the animation takes place when a certain shape is clicked. This allows you to run animation “on demand” and outwith the normal sequence of mouse cl…
    Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
    Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now