Forum Discussion

AFTAviation's avatar
AFTAviation
Cover User
2 years ago

MYOB Crashing when email invoices and statement in Outlook

Hi

 

I have been using AccoutRight and emailing statements and invoices using Outlook for many years. Recently MYOB starting crashing and creating an error code when doing this. I tried to get support from MYOB with no luck so I purchased a new laptop and reinstalled both and it is still happening. Can you please help. I use this feature many times every day and I am desperate to find a solution.

 

AccountRight Application Error Report

=====================================

Application Version: 2022.4.24.6510

Application File Version: 2022.4.24.6510 Incident Id: 6cfe418e-c40c-4577-add1-0f891d568f03

Time: Monday, 6 June 2022 9:53:03 AM

 

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: Element not found. (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND)).

 

 

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: Element not found. (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND)).

   at mscorlib!0x06004227!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) +0xf4

   at Huxley.UI.Controllers!0x06002588!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!0x06001b5d!MYOB.Huxley.UI.Controllers.Sales.PrintStatementsEmailController.<SendEmails>b__64_0(EmailHelper helper) +0xa1

   at Huxley.UI.Controllers!0x0600258c!MYOB.Huxley.UI.Controllers.Helpers.EmailHelper.SendEmail(Func`2 doSend) +0x0

   at Huxley.UI.Controllers!0x06001b5a!MYOB.Huxley.UI.Controllers.Sales.PrintStatementsEmailController.SendEmails(EmailHelper emailHelper) +0xd

   at Huxley.UI.Forms!0x060041e9!MYOB.Huxley.UI.Forms.Sales.PrintStatementsEmailView.<>c__DisplayClass16_0.<OnOkClicked>b__4() +0x0

   at Huxley.UI.Forms!0x06002715!MYOB.Huxley.UI.Forms.BaseForms.BaseViewContainer.PerformAction(Action methodToPerform) +0x16

   at Huxley.UI.Forms!0x060041e8!MYOB.Huxley.UI.Forms.Sales.PrintStatementsEmailView.<>c__DisplayClass16_0.<OnOkClicked>b__2() +0x0

   at Huxley.UI.Controllers!0x06001b5b!MYOB.Huxley.UI.Controllers.Sales.PrintStatementsEmailController.PerformActionWithWaitAnimationSpinner(Action action, Boolean disableForm) +0x1a

   at Huxley.UI.Forms!0x060030b2!MYOB.Huxley.UI.Forms.Sales.PrintStatementsEmailView.OnOkClicked(ButtonClickedArgs args) +0x11f

   at Huxley.UI.Forms!0x06003099!MYOB.Huxley.UI.Forms.Sales.PrintStatements.OnOkClicked(ButtonClickedArgs args) +0x6f

   at Huxley.UI.Forms!0x060023fa!MYOB.Huxley.UI.Forms.BaseForms.BaseViewForm.CallButtonClicked(Action`1 execute, ButtonClickedArgs args, String buttonText) +0x12

   at Huxley.UI.Forms!0x06002374!MYOB.Huxley.UI.Forms.BaseForms.BaseViewForm.btnOk_Click(Object sender, EventArgs e) +0x30

   at System.Windows.Forms!0x06000e1d!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!0x06000f04!System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) +0x184

   at System.Windows.Forms!0x06000f14!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!0x0600572a!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) +0x0

   at System.Windows.Forms!0x0600572d!System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) +0x8e

   at System.Windows.Forms!0x06002df3!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=2022.4.24.6510, Culture=neutral, PublicKeyToken=947f70fecdd4159f; G:38d3d2930b8148a8a3d710f7ce6e4fcc; A:1

MODULE: Huxley.UI.Controllers => Huxley.UI.Controllers, Version=2022.4.24.6510, Culture=neutral, PublicKeyToken=947f70fecdd4159f; G:263ddc8c3d7a413ab553d778465d4f08; A:1

MODULE: Huxley.UI.Forms => Huxley.UI.Forms, Version=2022.4.24.6510, Culture=neutral, PublicKeyToken=947f70fecdd4159f; G:3ece03498f43483b857a021443f5825a; 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:e802975d87a14ffa8a6a0836952ea231; A:2

MODULE: System.Windows.Forms => System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089; G:43eb03968e784a6cae5757b9b473b959; A:1

 

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

 

1 Reply

Replies have been turned off for this discussion
  • Hi AFTAviation

     

    Thanks for your post and welcome to the Community Forum ! By looking at the error log I can see that you are expereincing a Microsoft.Office.Interop.Excel._Application. Generally this error means that when a program such as AccountRight asks which version of Outlook is installed, the wrong version is being reported back, causing a communication problem and errors between the programs.

     

    This can happen when different versions of Office/Excel may have been previously installed on the computer, and components/values are left behind. This type of error can be fixed by one one of the following:

    Please do let us know how you go. 

     

    If my response has answered your enquiry please click "Accept as Solution" to assist other users find this information.