Page tree
Skip to end of metadata
Go to start of metadata



procedure SetTempPath(const AFolder: PAnsiChar); stdcall;


HRESULT _stdcall SetTempPath([in] BSTR Folder);



Use this method to set a temp path to a folder with read/write access. The API will make a copy of your document and store it in the given temp path when you call LoadDoc.

After you have finished your work on the document, you can choose to either save the document to the original directory or to another one by calling SaveDoc or respectively SaveDocTo. Afterwards you will have to call CloseDoc or EraseTempPath to delete the temporary copy of your document. If the given temp path does not exist (either partially or completely), then SetTempPath will create the path for you. If you don't set a temp path, the API will use the directory of your application as temp path. 


  • Call this before you call LoadDoc for the first time!
  • If you want to change the temp path during runtime, make sure, that no document is opened at that particular moment. That means, you have to call either CloseDoc or EraseTempPath before you can change the temp path.



Path to the folder where the temp files should be stored during runtime


C# sample  

// Set files for temp files




  • No labels