Convert a html report in pdf format

DarkHorseDarkHorse Member Posts: 389
edited 2007-03-28 in Navision Attain
Hello, yesterday I've asked how to send and e-mail automatily whithout confirmation. Still with the same, I'd like now to know how to send the a print report in .pdf format automatily. Now I send by mail a purchase order in html format automatily using the codeunit 397 in a button. I've installed Acrobat 5 that convert a document in .pdf format and I believed that setting the pdf printer at the report it should run, but this is not like this. Now the code is the following:

RecOrderRESET;
RecOrder.SETRANGE("Document Type","Document Type");
RecOrder.SETRANGE("No.","No.");
IF RecOrder.FIND('-') THEN BEGIN
IF RecOrder.GET("Pay-to Vendor No.") THEN BEGIN
rptOrder.SETTABLEVIEW(RecPedido);
rptOrder.SAVEASHTML('C:\Purchasing Order.html');
SLEEP(2000);
CodeMail.NewMessage(RecVendor."E-Mail",'','PURCHASING ORDER ' + "No.",
'Please, fin enclosed our new order ' + "No.",'C:\Purchasing Order.html,TRUE);
END;
END;

RecOrder is the table Purchase Header
rptOrder is the print report
I've changed also the C:\Purchasing Order.html by C:\Purchsing Order.pdf, but the result is the same. How can I do it?
Thanks in advance.

Comments

Sign In or Register to comment.