Forum Discussion

Alltrades1's avatar
Alltrades1
Experienced Cover User
3 years ago

Error while trying to email payslips

We have been having an issue with emailing payslips to staff for the last three weeks it comes up with an error

and then crashes and won't let you out of MYOB..... System.InvalidCastException

 

Please help with this error as we have to manually email payslip as pdf

3 Replies

Replies have been turned off for this discussion
  • Hi Alltrades1 

     

    This error when sending emails to Outlook can be caused by different factors. Generally, the error means, 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/Outlook may have been previously installed on the computer, and components/values are left behind. Errorlog will contain error messages such as:

    Microsoft.Office.Interop.Outlook
    System.InvalidCastException
    System.Runtime.InteropServices.COMException
    {00063001-0000-0000-C000-000000000046}
    Interface not registered

     

    A viable workaround is to use the online emailing function instead of outlook or you can follow these steps if you wish to send emails using Outlook:

     
    1. Quick Repair office. (any missing files should be added back) OR 
    2. Re-Register Outlook DLL files and Check/Fix Registry Keys (there are 3 to complete)

    Step 2 would require an IT Professional, as this is an environmental issue, with windows having missing or incorrect information. We can however provide this information to help: 

    https://webmakers.co.nz/interface-not-registered-exception-from-hresult-0x80040155-microsoft-office-...

     

    Please feel free to post should you have further questions.

  • Alltrades1's avatar
    Alltrades1
    Experienced Cover User
    3 years ago

    Thank you repairing Office worked.

     

    Are you able to advise how we stop showing the payslips that weren't emailed (we emailed manually) without

    re-emailing to the employees again

     

    Thank you

  • Komal_S's avatar
    Komal_S
    MYOB Staff
    3 years ago

    Hi Alltrades1 

    This can be done by opening the payruns for those dates and changing the delivery status to "Already emailed" and they would disappear from the "To be emailed" list.