close powerpoint

04-14-2004, 09:49 AM
I have an application that brings up a power point presentation when a button is pressed. The user clicks throught the slides, and I'd like to have the presentation and application close after the screen that says 'end of slide show, click to exit'.
The way it is now, the presentation ends, but power point stays open. I've tried adding .presentapplication.close and .quit, but then the presentation only shows one slide and quits. I've also tried an if statement that closes and quits if it's the last slide, but that did absolutely nothing. I'm sure I have syntax and/or code placement wrong.
Any ideas on what to add to the code to get the office application to end would be great.
Here's my stripped down code (without the attempts to close and quit):

Private Sub cmdPPT_Click()
Dim ppApp As New PowerPoint.Application
ppApp.WindowState = ppWindowMaximized
ppApp.Visible = True
ppApp.Presentations.Open FileName:=Path, ReadOnly:=True
With ppApp.ActivePresentation.SlideShowSettings
.LoopUntilStopped = False
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowManualAdvance
End With
Set ppApp = Nothing
End Sub

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum