|InfoPath Developer Reference|
Version Added: InfoPath 2003
expression An expression that returns a Application object.
|bForce||Optional||Boolean||Default value is False. Determines whether open forms will be saved during the quit operation. If set to True, all forms will be closed without saving, even if the data in the forms has been changed. If set to False, the user will be prompted to save the forms.|
If the Quit method is used in a form that is not fully trusted, the method will return a "permission denied" error.
Security Level 3: Can be accessed only by fully trusted forms.
In the following example, the Quit method of the Application object is used to quit InfoPath without saving any of the currently open forms: