.. highlightlang:: us .. index:: DocSave .. _docsave: DocSave ======= .. us.tag DocSave ENGLISH DocSet Changed412 Changed5400 :ref:`DocSave` saves a document to disk. .. function:: bool = DocSave(hDoc, ssFileName) bool = DocSave(hDoc, ssFileName, nFlags) .. us.return **Return Value** If the function succeeds, the return value is TRUE (1); otherwise it is FALSE (0). .. us.params **Parameters** .. uparam:: hDoc Identifies the document. .. uparam:: ssFileName *ssFileName* is the file name with the extension :file:`.ipz` or :file:`.ipw`. .. uparam:: nFlags .. list-table:: :header-rows: 1 * - Flags - Description * - ``DOC_SAVE_MRU`` (1) - The file name will be added to the most recent used file list. .. us.example **Example** :: // Use the forward slash: DocSave(hDoc, "d:/myfiles/doc.ipz") // or the double backslashes: DocSave(hDoc, "d:\\myfiles\\doc.ipz") .. us.comment **Comment** If a file with an identical filename already exists the file will be overwritten. The function fails if a file with the identical filename already exits and the file is open. **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2012 (5.40.0) - ipz file format. .. seealso:: :ref:`overview-documents`, :ref:`DocCreate`, :ref:`DocSaveModified`, :ref:`DocSetPathName` :sub:`id-1226046`