Home/ Reference/ Document

doc.Save() / doc.SaveAs(path)

Save, or save under a new path. Don't save inside a per-page loop; once at the end is enough.

Signature

doc.Save() / doc.SaveAs(path)

Notes

Save, or save under a new path. Don't save inside a per-page loop; once at the end is enough.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
out = "D:/output/final.cdr"               # the folder must already exist; nothing creates it for you

doc.SaveAs(out)                         # save as, and retarget the document path to the new file
print("Saved as: ", doc.FileName)

doc.Save()                              # later saves go straight back to this path

About this section: Document

Document — documents and file handling.

Other entries in this section