Codeunit 397 Mail not working after upgrade

alsolalsol Member Posts: 243
edited 2015-05-28 in NAV Three Tier
After an upgrade from NAV 2009 R2 to NAV 2015, the codeunit 397 does not work on all clients anymore.

Some of the clients run Office 2010 where it works perfectly. But the clients with Office 2013 no new email is being generated. The message that asks for permission to access automation still appears, but after clicking on Always allow nothing happens.

Is the behavior of this codeunit in any way different when using Office 2013? After adding the Outlook Inbox to the Rolecenter it showed an error message which I believe is related to the issue with codeunit 397:

Unable to cast COM object of type 'Microsoft.Office.Interop.Outlook.ApplicationClass' to interface type 'Microsoft.Office.Interop.Outlook._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00063001-0000-0000-C000-000000000046}' failed due to the following error: Interface not registered (Exception from HRESULT: 0x80040155).

Does anyone have any idea about this? Never seen that before ](*,)

Comments

  • k_debruynek_debruyne Member Posts: 2
    Hey

    Have you ever figured this out? We're having the same problem going from 2009R2 to 2017.
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Are you sure you have correctly upgraded C397 in your installation?

    The C397 no longer uses any automation objects. The error "Unable to cast COM object of type 'Microsoft.Office.Interop.Outlook.ApplicationClass' suggests that in your solution there is some bespoke code built using old C397 functions/variables, which tries to 'talk' to upgraded C397 functions (which use DotNet vars only)
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • k_debruynek_debruyne Member Posts: 2
    Apparently this is (we think) caused by uninstalling NAV 2009R2. It must be removing something that NAV or Office needs to work with. After an office repair, everything worked again.
Sign In or Register to comment.