This documentation is archived and is not being maintained.

Application.Quit Method

Office 2007
Quits the Microsoft Office InfoPath 2007 application.

Version Information
 Version Added:  InfoPath 2003

Syntax

expression.Quit(bForce)

expression   An expression that returns a Application object.

Parameters

NameRequired/OptionalData TypeDescription
bForceOptionalBooleanDefault 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.

Return Value
Nothing

Remarks

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.

Example

In the following example, the Quit method of the Application object is used to quit InfoPath without saving any of the currently open forms:

JScript
Application.Quit(true);



Show: