Application.Quit method (Publisher)

Quits Microsoft Publisher. This is equivalent to choosing Exit on the File menu.

Syntax

expression.Quit

expression A variable that represents an Application object.

Remarks

To avoid losing unsaved changes, use either the Save or SaveAs method to save any open publication before calling the Quit method.

Example

This example saves the open publication if there is one and then closes Publisher.

If Not (ActiveDocument Is Nothing) 
 ActiveDocument.Save 
End If 
Application.Quit

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.