Professional Documents
Culture Documents
Saving a document
Saving a document to a file
Solution
If you already know where the file to save into is located or you want full control over how the user is
prompted for the file location, call IDocumentCommands::SaveAs.
If you want the user to be asked to identify the file to save to using the application’s save file dialog, call
IDocFileHandler::SaveAs.
Sample code
SDKLayoutHelper::SaveDocumentAs
Related API
IDocumentCommands
Saving a document
You can save a document that was saved to a file at least once before (IDocument::IsSaved indicates this).
Solution
IDocumentCommands::Save
IDocFileHandler::Save
Related APIs
IDocument
IDocumentCommands
IDocFileHandler
Closing a document
Solution
To close any layout windows that are open, then schedule a command to close the document, use
IDocFileHandler::Close.
Sample code
SDKLayoutHelper::CloseDocument