Forum Discussion

EskyJammer's avatar
10 months ago

Invoices and Purchaser orders not sending, System.InvalidCastException error.

Every time we go to send an invoice or pruchase order the following comes up.

 

We have tried using new outlook as default, uninstalling both outlook and MYOB to no avail.

 

Also ocurrs if we change to a different company file (we have two companies)

 

Does anybody have a solution as this is a major headache.

 

below is the error mesage

 

Cheers

nathan.

 

AccountRight Application Error Report
=====================================
Application Version: 2020.1.23.5508
Application File Version: 2020.1.23.5508
Incident Id: 5a4f7900-b1e5-4cc6-9e33-35bfb704439a
Time: Wednesday, April 1, 2020 2:28:50 PM

Code:
System.InvalidCastException


Message:
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).


Stack Trace
----------------------------------------
1 : System.InvalidCastException
----------------------------------------
System.InvalidCastException: 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).
at mscorlib!0x06004226!System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)
at Microsoft.Office.Interop.Outlook!0x06002365!Microsoft.Office.Interop.Outlook.ApplicationClass.CreateItem(OlItemType ItemType)
at Huxley.MsOffice.Integration!0x06000078!MYOB.Huxley.MsOffice.Integration.OutlookEmail.OutlookEmailProvider.SendMessage(String emailAddresses, String subject, String body, EmailResourceType resourceType, String documentNumber, IEnumerable`1 attachments) +0xf7
at Huxley.UI.Controllers!0x0600110b!MYOB.Huxley.UI.Controllers.Helpers.EmailHelper.SendEmail(String to, String subject, String body, String pdfFileName, EmailResourceType resourceType, FormTemplateDefinition formTemplateDefinition, FormPrintingParams formPrintingParams, IEnumerable`1 attachements, Nullable`1 entityUid, LayoutType layoutType, String documentNumber) +0xd0
at Huxley.UI.Controllers!0x06002012!MYOB.Huxley.UI.Controllers.SalesAndPurchases.SendEmailController.SendEmail(String emailAddress, String subject, String message, IEnumerable`1 attachments) +0x6c
at Huxley.UI.Controllers!0x06002011!MYOB.Huxley.UI.Controllers.SalesAndPurchases.SendEmailController.SendEmail(String emailAddresses, String subject, String message) +0xb
at Huxley.UI.Forms!0x0600253d!MYOB.Huxley.UI.Forms.SalesAndPurchases.SendEmail.<OnOkClicked>b__22_0() +0x0
at Huxley.UI.Forms!0x060031f8!MYOB.Huxley.UI.Forms.BaseForms.BaseViewContainer.PerformAction(Action methodToPerform) +0x16
at Huxley.UI.Forms!0x0600251d!MYOB.Huxley.UI.Forms.SalesAndPurchases.SendEmail.OnOkClicked(ButtonClickedArgs args) +0x48
at Huxley.UI.Forms!0x06002ee0!MYOB.Huxley.UI.Forms.BaseForms.BaseViewForm.CallButtonClicked(Action`1 execute, ButtonClickedArgs args, String buttonText) +0x12
at Huxley.UI.Forms!0x06002e5a!MYOB.Huxley.UI.Forms.BaseForms.BaseViewForm.btnOk_Click(Object sender, EventArgs e) +0x30
at System.Windows.Forms!0x06000e16!System.Windows.Forms.Control.OnClick(EventArgs e) +0x19
at DevExpress.XtraEditors.v17.1!0x06000d4f!DevExpress.XtraEditors.BaseButton.OnClick(EventArgs e) +0x2e
at DevExpress.XtraEditors.v17.1!0x06000d48!DevExpress.XtraEditors.BaseButton.OnMouseUp(MouseEventArgs e) +0x1d
at System.Windows.Forms!0x06000efd!System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) +0x184
at System.Windows.Forms!0x06000f0d!System.Windows.Forms.Control.WndProc(Message& m) +0x62c
at DevExpress.Utils.v17.1!0x06002708!DevExpress.Utils.Controls.ControlBase.WndProc(Message& m) +0x2e
at DevExpress.XtraEditors.v17.1!0x06000256!DevExpress.XtraEditors.BaseControl.WndProc(Message& msg) +0x0
at System.Windows.Forms!0x0600571b!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) +0x0
at System.Windows.Forms!0x0600571e!System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) +0x8e
at System.Windows.Forms!0x06002def!System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) +0x25
==========
MODULE: DevExpress.Utils.v17.1 => DevExpress.Utils.v17.1, Version=17.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a; G:b8c34c059b804930811d5f6d50999b6c; A:1
MODULE: DevExpress.XtraEditors.v17.1 => DevExpress.XtraEditors.v17.1, Version=17.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a; G:6df94e55f5bd4444b910d4b2a37076a4; A:1
MODULE: Huxley.MsOffice.Integration => Huxley.MsOffice.Integration, Version=2020.1.23.5508, Culture=neutral, PublicKeyToken=947f70fecdd4159f; G:f1da552f45fc4ac283ffd586525d3d56; A:1
MODULE: Huxley.UI.Controllers => Huxley.UI.Controllers, Version=2020.1.23.5508, Culture=neutral, PublicKeyToken=947f70fecdd4159f; G:3bf8ba1176c74d72ac7474560559dfa8; A:1
MODULE: Huxley.UI.Forms => Huxley.UI.Forms, Version=2020.1.23.5508, Culture=neutral, PublicKeyToken=947f70fecdd4159f; G:b7845fa915ff4d1382cc77fbc411f0ef; A:1
MODULE: Microsoft.Office.Interop.Outlook => Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c;
MODULE: mscorlib => mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089; G:2ea9736f9dc24c8789f43adaed256524; A:2
MODULE: System.Windows.Forms => System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089; G:f151916e8df143d3846906613de0068f; A:1

----------------------------------------

 

 

 

  • Hi EskyJammer

     

    Thanks for posting. We appreciate you attaching the diagnostic log script in your post. 

     

    I'm sorry to hear about your difficulties sending emails. In my understanding of the error log, it seems that you have some issues connecting your Outlook to AccountRight. 

     

    To fix this I recommend downloading and running the Quick Repair Office from the Microsoft website and run it for the Outlook program. If this does not fix the issue. I recommend seeking help from an IT personnel to Re-register the outlook DLL files and Check/Fix the registry keys. (you can provide this to the IT personnel https://webmakers.co.nz/interface-not-registered-exception-from-hresult-0x80040155-microsoft-office-outlook-error/)

     

    Let us know if you require any further assistance.

     

    Thanks,
    Genreve

     

     

  • Hi EskyJammer

     

    Thanks for posting. We appreciate you attaching the diagnostic log script in your post. 

     

    I'm sorry to hear about your difficulties sending emails. In my understanding of the error log, it seems that you have some issues connecting your Outlook to AccountRight. 

     

    To fix this I recommend downloading and running the Quick Repair Office from the Microsoft website and run it for the Outlook program. If this does not fix the issue. I recommend seeking help from an IT personnel to Re-register the outlook DLL files and Check/Fix the registry keys. (you can provide this to the IT personnel https://webmakers.co.nz/interface-not-registered-exception-from-hresult-0x80040155-microsoft-office-outlook-error/)

     

    Let us know if you require any further assistance.

     

    Thanks,
    Genreve

     

     

    • That link is blocked via telstra.

      Can you turn it into a pdf please.

      I still have not any luck. Another colleague in purchasing cannot send purchase orders.

       

      Still not resolved.