CloseAll Method

Home Page (Objects)OverviewFAQReference

Applies to: Documents object, Windows object

Closes all windows or documents.

Syntax

object.CloseAll [SaveChanges]

Parameters

object

An expression that evaluates to a Documents object or a Windows object.

SaveChanges

(Optional) An enum of type DsSaveChanges that indicates whether to save changes to one or more documents before closing them. Following are the possible values, which have the Long type:

Return Values

The CloseAll method returns the enum dsSaveStatus, which has one of the following values:

Example

The following example saves the changes to all open documents and then closes those documents:

Documents.CloseAll

See Also   Open method.