How to Automatically Stop a PowerPoint Presentation

Yesterday, we looked at starting a PowerPoint presentation to a schedule using Power Manager. We used a small AppleScript to open PowerPoint and start the presentation playing.

Today, we will walk through how to stop a Microsoft PowerPoint Presentation with Power Manager. As with starting a presentation, stopping the presentation will require a little AppleScript.

If you are using Power Manager to shut down your Mac at the end of the presentation, you should consider skipping this event. Power Manager's shut down process will stop the presentation and quit PowerPoint for you.

For this walk through, let's assume you want to stop the presentation at a specific time each day but not shut down.

Creating an Event to Automatically Stop PowerPoint

  1. Launch System Preferences and select Power Manager.
  2. Click Add… to create a new event.
    Click Add… to create a new event in Power Manager
  3. Choose the template Run a script daily.
    Choose the Schedule Assistant's template Run a script daily
  4. Where Power Manager asks for the Script to run, copy and paste in the following AppleScript:
    #!/usr/bin/osascript
    
    tell application "Microsoft PowerPoint"
    
        exit slide show slide show view of slide show window of active presentation
    
        -- Save to avoid save dialog blocking
        tell active presentation
            save in myPresentation
            close
        end tell
    
        quit
    
    end tell
    Power Manager supports embedding AppleScripts
    Copy and Paste in the PowerPoint AppleScript Snippet
  5. Continue to the next step.
  6. Select the time and days to stop your presentation.
    Set up when to stop your PowerPoint presentation
  7. Continue through the remaining steps until your event is created.
    Your AppleScript is ready and scheduled to stop PowerPoint

Your event is now ready and scheduled. The event will run your AppleScript as front most user. The AppleScript asks PowerPoint to exit the active presentation, save any changes, and quit. The save is required to avoid PowerPoint presenting a save dialog.

This event is self-contained. The AppleScript is included in the event. You can freely share your PowerPoint controlling events with others via e-mail, without needing to rely on other files.

This article was posted in , , and and tagged , , , , and .

Published by Graham Miln on