How to make a slide show quit at logout?

D

David Morrison

I have a Powerpoint 2004 slide show running on a Mac Mini and a TV in a
display hall. The hall is only open 8:30am to 4:30pm, and I want the Mac
to shut down when it closes so as to save the screen, and start again in
the morning.

So far the whole process works well, with one exception. While
PowerPoint is running the slide show, it does not respond to the logout
signal. Logout then fails and the computer stays on with the Logout
failed message in the middle of the screen. :-(

If Powerpoint is running, but is not running the show, it does quit.

Is there some way to make Powerpoint quit when the computer is trying to
shut down?

(I have an AppleScript to make it stop the slide show and quit, but I
cannot get it to run successfully at logout.)
 
P

Priyanka

I have a Powerpoint 2004 slide show running on a Mac Mini and a TV in a
display hall. The hall is only open 8:30am to 4:30pm, and I want the Mac
to shut down when it closes so as to save the screen, and start again in
the morning.

So far the whole process works well, with one exception. While
PowerPoint is running the slide show, it does not respond to the logout
signal. Logout then fails and the computer stays on with the Logout
failed message in the middle of the screen. :-(

If Powerpoint is running, but is not running the show, it does quit.

Is there some way to make Powerpoint quit when the computer is trying to
shut down?

(I have an AppleScript to make it stop the slide show and quit, but I
cannot get it to run successfully at logout.)

Can you share the applescript?

Thanks,
-Priyanka
 
D

David Morrison

Priyanka said:
Can you share the applescript?

Pretty trivial, but here it is:

tell application "Microsoft PowerPoint"
try
exit slide show slide show view of slide show window 1
end try
quit
end tell
 
D

David Morrison

David Morrison said:
I have a Powerpoint 2004 slide show running on a Mac Mini and a TV in a
display hall. The hall is only open 8:30am to 4:30pm, and I want the Mac
to shut down when it closes so as to save the screen, and start again in
the morning.

So far the whole process works well, with one exception. While
PowerPoint is running the slide show, it does not respond to the logout
signal. Logout then fails and the computer stays on with the Logout
failed message in the middle of the screen. :-(

If Powerpoint is running, but is not running the show, it does quit.

I'm calling it a bug, and PowerPoint 2004 is unlikely to be fixed now.
So I have adopted the low tech solution, and someone is going to turn
the TV off each afternoon, and back on again each morning. :)
 
P

Priyanka

I'm calling it a bug, and PowerPoint 2004 is unlikely to be fixed now.
So I have adopted the low tech solution, and someone is going to turn
the TV off each afternoon, and back on again each morning. :)

Yeah I run into the same issue as well. Sorry.
-Priyanka
 
J

Jim Gordon MVP

Priyanka said:
Yeah I run into the same issue as well. Sorry.
-Priyanka

Hi,

PowerPoint 2004's built-in visual basic language (VBA) can quit the
application for you. Here's an example from the Help system of
PowerPoint's visual basic editor:

Quit Method Example
This example saves all open presentations and then quits PowerPoint.
With Application
For Each w In .Presentations
w.Save
Next w
.Quit
End With

You can get to the editor using Tools > Macro > Visual Basic Editor from
PowerPoint's standard menu.

Here's a link to get you started with VBA
http://www.pptfaq.com/FAQ00033.htm

VBA can perform tasks at specified times. This example shows how to get
the current system time:

Time Function Example
This example uses the Time function to return the current system time.
Dim MyTime
MyTime = Time ' Return current system time.

I'm not trying to build your code for you because I am hoping to show
you that it can be done, and hope you will take a few minutes to explore
the Visual Basic link I provided first. In my very sleepy way I am
trying to tell you that you could create a small program that shuts
PowerPoint down every day at a specific time.

If you prefer Applescript, it would be possible to have an AppleScript
accomplish the task of shutting down PowerPoint instead of using VBA.
Are you interested in learning more about this?

-Jim
 
D

David Morrison

Jim Gordon MVP said:
PowerPoint 2004's built-in visual basic language (VBA) can quit the
application for you. Here's an example from the Help system of
PowerPoint's visual basic editor:

Quit Method Example
This example saves all open presentations and then quits PowerPoint.
With Application
For Each w In .Presentations
w.Save
Next w
.Quit
End With

You can get to the editor using Tools > Macro > Visual Basic Editor from
PowerPoint's standard menu.

Here's a link to get you started with VBA
http://www.pptfaq.com/FAQ00033.htm

Thanks for the suggestion Jim. In the 20 or so years I have been using
MS products, this would be the first time I have needed to resort to
Visual Basic. :)

On that level of usage, I'm reluctant to commit the time to learning it,
especially when there are other alternatives I am already familiar with.
AppleScript is one. Or I could just set up a job in cron to kill
Powerpoint at the appropriate time, which would take about 5 minutes to
do.

Cheers

David
 
J

Jim Gordon MVP

David said:
Thanks for the suggestion Jim. In the 20 or so years I have been using
MS products, this would be the first time I have needed to resort to
Visual Basic. :)

On that level of usage, I'm reluctant to commit the time to learning it,
especially when there are other alternatives I am already familiar with.
AppleScript is one. Or I could just set up a job in cron to kill
Powerpoint at the appropriate time, which would take about 5 minutes to
do.

Cheers

David

Hi David,

You might encounter a dialog box asking if you want to save the open
presentation as PowerPoint quits. You may need to dismiss that dialog,
or use a script that turns off alerts before shutting down PowerPoint.

-Jim
 
D

David Morrison

Jim Gordon MVP said:
Hi David,

You might encounter a dialog box asking if you want to save the open
presentation as PowerPoint quits. You may need to dismiss that dialog,
or use a script that turns off alerts before shutting down PowerPoint.

The shell command to kill a process has options to Force Quit a process.
Powerpoint would not get a chance to put up any alerts.

Cheers

David
 
J

Jim Gordon MVP

David said:
The shell command to kill a process has options to Force Quit a process.
Powerpoint would not get a chance to put up any alerts.

Cheers

David

Then by all means, go for it! Feel free to use any technology in the
arsenal. Whichever you know and are comfortable with is fine.

-Jim
 

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