Share via


Quit Method [Publisher 2003 VBA Language Reference]

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

expression.Quit

expression Required. An expression that returns one of the objects in the Applies To list.

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 quits Publisher.

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

Applies to | Application Object