Close Method |
Closes the specified drawing, or all open drawings.
Signature
object.Close([SaveChanges][, FileName])
Object
Document; Documents
The document to close.
SaveChanges
Variant; input-only; optional
(Not applicable when called from Documents collection.)
Specifies if the drawing is to be saved or not.
TRUE: Save the drawing.
FALSE: Do not save the drawing.
FileName
String; input-only; optional
(Not applicable when called from Documents collection.)
The name to assign to the drawing. If no name is provided when
saving a drawing for the first time, the drawing will be saved
using the VBA project information:
ThisDrawing.Path\ThisDrawing.Name.
Remarks
If there are no changes to the drawing, SaveChanges and FileName are ignored. If there are changes to the drawing, SaveChanges specifies whether changes should be saved. The default value for the SaveChanges parameter is TRUE.
Calling this method from the Documents collection in MDI mode will close all open drawings. To close a single drawing, call this method from the drawing to be closed.
You cannot close a drawing from inside an event handler for that drawing.
NOTE Closing a drawing destroys the Document object. Never try to reference an object once it has been destroyed, or in this case, closed. In-process clients (VBA macros) may notice that objects are not destroyed until the subroutine is exited. However, references to destroyed objects are not recommended at all, even in the in-process code.
Comments? |