Codeunit 397 (Mail) - Error

Hi, I’m using version 4.0 W1 SP1 of navision. I have a code, which works perfectly in version 3.70 but does not work in version 4.0. See the code below: ------------------------------------------------- SalesReport.settableview(salesinvheader); SalesReport.userrequestform := false; SalesReport.runmodal; Clear(SalesReport); Mail.NewMessage(‘’,’’,’’,’’,’’,false); ------------------------------------------------- When trying to execute the last command (Mail.NewMessage) the system is showing error message ‘Could not create an instance of the ‘NS Outlook Synchronization Handler’.Oapplication…’. It happens in codeunit 397 in function NewMessage and command CREATE(oApplication). The report variable (SalesReport ) is just blank report for testing purpose only. The variable (salesinvheader) is record 112. If I comment the code RUNMODAL the system can send email. I know that the codeunit 397 is using new OLHandler.DLL but I do not know why it cannot send e-mail after using command Report.RUNMODAL!!! I’ve re-installed navision, registered OLHandler.DLL but no luck. Have you got any ideas?? Thanks, Jozef

Does it also happen if you are running let’s say an item report modally before ?

Hi, The problem only happens if I do the following logic flow. Let’s say that I’ve got: ------------------------- Report 1 (can be any report eg. Item) Codeunit 1 (contains the code above for report.runmodal and send mail) Report 2 (can be any report eg. Item) ------------------------- and the logic is that from ‘Report 1’ I call the ‘Codeunit 1’ which runs ‘Report 2’ as modal and then send mail. This works OK if I run ‘Report 1’ in preview mode but when I run it in print mode it’s failing with the error mentioned above. Any ideas why?? Thanks,

I was told that if you apply the MS Office SP2 then there are issues with Sending email from Navision. Microsoft has a unreleased hotfix that you need to request that solved the problem for me.