PDF files attached in MAPI e-mails from Navision

Hi, I’m developping a system that involves automatic generation of PDFs (Navision reports) with Acrobat Distiller Printer. The next step would consists in attach PDF files to e-mails created by automatic processing but I have at least two problems: 1) I can´t appreciate when a file is created. When the file appears in operating system the process tries selecting PDF file but sometimes it is corrupt (creation is not finished). In other projects I used Navision HTML reports creation without problems, and I viewed PDF files creation end using the RENAME command from Navision after printing. With this technique HTML file was complete before using. Could anyboy tell me how detect the complete creation of an PDF file??? 2) The second important problem : Is it possible to detect when an e-mail is sent without problems??? The prior PDF files are related to an Internet-ASP application. Users, from an ASP page, generate filtered reports in Navision. To avoid ASP time-outs, in big reports, I want create PDF files instead HTML files. And the PDF file is attached to e-mail and sent to the ASP user. The problem is if the e-mail creates an error or if something is wrong and the e-mail doesn´t reach the end User. In addition, the whole process is automatic of course. Thanks …

Just a suggestion - maybe you could try to email the report(s) a couple of minutes later?

I do not know if you can SHELL the creation of the PDF but if you can you could detect the completion of the PDF file by doing ReturnValue := SHELL(CreatePDFString); MESSAGE(‘PDF File as been created’); The MESSAGE line would only be executed after the SHELL has finnished his task. ###### tarek_demiati@ureach.com

You need to do a repeat until on the file system table (2000000022), until you see the file, and it has a size of more than zero. Regards