Application.Quit Method

Project Developer Reference

Quits Microsoft Office Project 2007.

Syntax

expression.Quit(SaveChanges)

expression   A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
SaveChanges Optional Long Specifies whether Office Project 2007 saves changes before quitting. Can be one of the following PjSaveFormat constants: pjDoNotSave, pjSave, or pjPromptSave. The default is pjPromptSave for new project files and projects that have changed since the last save.

Example
The following example saves all open projects and then quits Office Project 2007.

Visual Basic for Applications
  Sub SaveChangesAndQuit()
    Quit SaveChanges:=pjSave
End Sub

See Also