CloseDocument File Command

Close an open document.

closedocument [mode] [DOCUMENT name | WINDOW name]

mode/k The user prompt mode for unsaved documents. Options: FORCE | ALERT | QUIET (default). Force ignores the saved status, alert opens an alert box if it has been changed, and quiet ignores the saved status but returns an error if the document had not been saved.

DOCUMENT/s The document name. Default=current.

WINDOW/s The window name. Default=current.

Notes:

This command closes all open views of the document and the document itself. To close a single view of a document, use the closewindow command.

Examples:
ARexx:

closedocument force document 'project.doc'

 

CloseDocument  Command Definition  url:PGScmd/closedocument
  created:2006-03-30 10:07:12   last updated:2006-08-18 11:15:47
  Copyright © 1985-2024 GrasshopperLLC. All Rights Reserved.

User Contributed Comments For CloseDocument
Dan Kilroy wrote...2006-05-04 16:34:48

Close an open document.

CloseDocument ([mode/k] [,DOCUMENT document | WINDOW document-window])

Parameters:
mode/k The user prompt mode for unsaved documents. Options: FORCE | ALERT | QUIET (default). Force ignores the saved status, alert opens an alert box if it has been changed, and quiet ignores the saved status but returns an error if the document had not been saved.

DOCUMENT/s The document name. Default=active document.

WINDOW/s The window name. Default=active window.

Results:
No data is returned.

Notes:
This command closes all open views of the document and the document itself. To close a single view of a document, use the CloseWindow command.

See Also:
CloseWindow, NewDocument, OpenDocument, OpenWindow

Examples:
Python:

CloseDocument('force', 'document', 'project.doc')

ARexx:
CloseDocument force document 'project.doc'

Applescript:

User Contributed Comments For CloseDocument