Autosave not working (COM)

2008-07-31 23:21:48 by abif

I use Delphi 7. After I set the AutosaveDirectory Option with my program, the pdfs are being saved in the previous directory set in PDFCreator. Only the next time I run my program the pdfs are saved in the correct directory. My code is:

O_Creator:= CreateOleObject('PDFCreator.clsPDFCreator');
If O_Creator.cStart('/NoProcessingAtStartup') = False Then
msg('Can\'t initialize PDFCreator');
O_Creator.cVisible:= False;
O_Creator.cClearCache;
O_Creator.cClearLogfile;
O_Options:= CreateOleObject('PDFCreator.clsPDFCreatorOptions');
O_Options:= O_Creator.cOptions;
O_Options.UseAutosave:= 1;
O_Options.UseAutosaveDirectory:= 1;
O_Options.AutosaveFormat:= 0;
O_Options.AutosaveDirectory:= DirPDF;
O_Options.AutosaveFilename:= '';<br> O_Options.NoConfirmMessageSwitchingDefaultprinter:= 1;<br> O_Creator.cSaveOptions(O_Options);<br> O_Creator.cClose;<br><br>Thank you very much!</p><hr><h2></h2><h3>2008-08-01 09:48:39 by thesmilyface</h3><p>Which os?</p><hr><h2></h2><h3>2008-08-01 16:20:00 by abif</h3><p>Windows XP Professional</p></body></html>