CloseAll
The CloseAll method closes all documents in the collection. Returns a Boolean. Returns 'True', if all the documents are saved and closed successfully, else returns 'False'.
Syntax
object.CloseAll( SaveChanges )
Parameter |
Type |
Default |
Description |
SaveChanges |
srfSaveChangesYes |
optional; This provides the options of saving the file(s) before closing, i.e., saving the current changes, not saving the current changes, or to ask the user whether to save the current changes or not. |
Remarks
Returns true if all documents were closed, false if the user canceled the operation.
Example 1
This example demonstrates how to prompt the user to save open documents prior to closing all of them.
Docs.CloseAll(SaveChanges:=srfSaveChangesAsk)
Example 2
This script displays all the methods and properties in the Documents collection.
Used by: Documents collection