Close [Document]
The Close method closes the document and all associated windows or views. Returns a Boolean. Returns 'True', if the document is closed successfully, otherwise returns 'False'.
Syntax
object.Close( SaveChanges, FileName )
Parameter |
Type |
Default |
Description |
SaveChanges |
srfSaveChangesYes |
optional; This provides the options of saving the file 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. |
|
FileName |
String |
"" |
optional; This provides the name of file to be closed. |
Remarks
Returns true if the document was closed. The document may not be closed if srfSaveChangesYes operation was canceled by the user.
Example
This example demonstrates how to prompt the user with regard to saving a document prior to closing it.
Doc.Close(SaveChanges:=srfSaveChangesAsk)
Used by: Document object