• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 572
  • Last Modified:

powerpoint application.quit

My end show button uses the application.quit command to get out of powerpoint completely - but, it doesn't prompt to save changes to any presentaions already open. It doesn't save any changes and closes everything.
I need to prompt to save.
0
englishman
Asked:
englishman
1 Solution
 
tureCommented:
englishman,

Same problem here and it seems like a bug to me. I'm using PowerPoint 2000 and the help file says...

"To avoid being prompted to save changes, use either the Save or SaveAs method to save all open presentations before calling the Quit method."

....but I don't get any questions at all, PowerPoint just quits without prompting or saving changes.

To be prompted to save before quitting, you may use this procedure and attach it to your 'end show' button.

Sub AskToSaveBeforeQuitting()
  Dim pres As Presentation
 
  For Each pres In Presentations
    If Not pres.Saved Then
      Select Case MsgBox("Save changes to " & pres.Name, vbYesNoCancel)
        Case vbYes: pres.Save
        Case vbCancel: Exit Sub
      End Select
    End If
  Next pres
 
  Application.Quit
End Sub

Ture Magnusson
Karlstad, Sweden
0
 
antratCommented:
Hi englishman

This code will save all open presentations

Sub CloseAll()
Dim w As Object
With Application
    For Each w In .Presentations
        w.Save
    Next w

hope it helps
antrat
    .Quit
End With
End Sub

0
 
englishmanAuthor Commented:
Just the job.
Cheers
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now