Interface not registered (Exception from HRESULT: 0x80040155) - Outlook only

Hi, I’m facing error when I tried to take any actions about Outlook via UiPath. Actions of Excel is working fine.
I’ve spent lots of time to find the solution including UiPath Forum but no luck.

Here’s the full error record.
19.10.4+Branch.support-v2019.10.Sha.fe819a658cad0585a64d2f8af94fad5c30b8d122

Source: Send Outlook Mail Message

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

Exception Type: System.InvalidCastException

RemoteException wrapping 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 UiPath.Mail.Activities.SendMailActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

And nothing is strange in reg.

Could someone help solve the issue? Thanks.

@healsko_ho

Hello, welcome to the community !

I guess you recently downgraded from a higher version of office to a lower version right ?

If it’s the case check below links, might resolve your issue :point_down:

Outlook issue - Unable to cast COM object of type ‘Microsoft.Office.Interop.Outlook.ApplicationClass’

If this doesn’t solve your issue, erase from the registry the key 00063001-0000-0000-C000-000000000046

Let me know if this fixed your issue… :slight_smile:

@mz3bel
I don’t think we downgraded the office version but my EUS colleague helped me delete the registry key (since I don’t have the admin right), it didn’t work.
Then he helped me uninstall the Office & UiPath then install. Same error occurs.
The UiPath performed well in 2019 and this issue jumped out after windows upgraded on Feb 2020. I don’t know it has any relationship or not.
Looking forward for your next advise…

1 Like

Hello Bro

Have you checked “MSOUTL.OLB” file is presented on version key path. This kind of issue only comes when you have some invalid registry keys or “MSOUTL.OLB” is not presented at defined location.

Could you please check it and let me know you still face this issue. I will defiantly help you resolving this issue. Because I have worked on such kind of issue,

Hi, may I know where I should check? In Registry Editor?