ExitWindows Method

Applies To

Tasks collection object.

Description

Closes all open applications, quits Microsoft Windows, and logs the current user off. This method doesn't save changes to open Word documents; however, it does prompt you to save changes to open documents in other Windows-based applications. This method isn't available on the Macintosh.

Syntax

expression.ExitWindows

expression Required. An expression that returns a Tasks object.

See Also

Quit event, Quit method.

Example

This example saves all open Word documents, quits Word, and then quits Microsoft Windows.

Documents.Save NoPrompt:=True, OriginalFormat:=wdOriginalFormat
Tasks.ExitWindows