Question

1
Replies
564
Views
MadhuC30 Member since 2016 4 posts
Cognizant
Posted: July 13, 2017
Last activity: July 14, 2017
Closed

COM error in outlook

Hello,

I was trying to automate an outlook popup using the windows adapter. The solution worked perfectly in Dev box but when deployed on Prod getting the below exception. Any thoughts please.

Extra Msg: System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.Outlook._MailItem'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00063034-0000-0000-C000-000000000046}' failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)).

at Microsoft.Office.Interop.Outlook._MailItem.Close(OlInspectorClose SaveMode)

at OpenSpan.Office.MicrosoftOutlookMail.ReleaseOfficeInstance()

at OpenSpan.Office.MicrosoftOutlookMail.New()

Thanks,

Madhu

***Moderator Edit: Vidyaranjan | Updated Categories***

Robotic Process Automation
Moderation Team has archived post
Share this page LinkedIn