Declaration
Automation:
void  Close ( ) ;
Native (C++):
HRESULT  Close ( ) ;
Return Value
S_OK or standard OLE error code.
Remarks
Discard document's operation history and close the document. You may subsequently call the IFileDocument.New or IFileDocument.Open method for this document. Complexity: constant-time.
Examples

Reusing document objects

C#Copy Code
FileDocumentLib.FileDocument fdoc=new FileDocumentLib.FileDocument();
fdoc.Open(@"c:\temp\file1");
// perform modifications to the file and save it
fdoc.Save(false);

// prepare the object to work with a next document
fdoc.Close();
fdoc.Open(@"c:\temp\file2");
// ...
    

See Also