procedure EraseTempPath; stdcall;
HRESULT _stdcall EraseTempPath(void);
EraseTempPath calls CloseDoc and deletes the last directory from the given temp path including all files (e.g. if the given temp path is "C:\temp\dir2\", then EraseTempPath will delete "dir2" including all files in that directory). If the folder "dir2" was existing before you called SetTempPath, erase will not delete the directory itself, but the files in it.
|Make sure, that you have called SaveDoc or SaveDocTo before you call EraseTempPath to save the changes in the loaded document.|