Upgrading from V7 to V8 / Outlook 2007 to 2016

Add-in Express™ Support Service
That's what is more important than anything else

Upgrading from V7 to V8 / Outlook 2007 to 2016
Upgrading from V7 to V8 / Outlook 2007 to 2016 
Andrew Lockwood


Guest


I have an Outlook COM AddIn that I wrote using AddIn Express v7 for Outlook 2007.

I have just moved to Outlook 2016 and upgraded to AddIn Express v8, but am struggling to get my plugin working. When I try to access a folder from it's EntryID, I get the following error:-

The application called an interface that was marshalled for a different thread

Could someone possibly explain to me what is causing my problem, so that I can then hopefully update my code to sort it out.

Thanks.


Andrew
Posted 03 Aug, 2016 10:49:26 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Hello Andrew,

I suppose the message means you are calling into the Outlook object model from a background thread. Is this the case?


Andrei Smolin
Add-in Express Team Leader
Posted 04 Aug, 2016 01:07:20 Top
Andrew Lockwood


Guest


Andrei Smolin writes:
I suppose the message means you are calling into the Outlook object model from a background thread. Is this the case?


Yes - but it worked fine with Outlook 2007 and Add-In Express v7.


Andrew
Posted 04 Aug, 2016 12:21:21 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Hello Andrew,

Outlook has changed.

From https://msdn.microsoft.com/en-us/library/office/jj228679.aspx:

Be aware that all calls to the Outlook object model execute on Outlook?Â?Ð?és main foreground thread. Avoid making long-running Outlook object model calls if possible. Note that in Outlook 2013, calls to the Outlook object model return E_RPC_WRONG_THREAD when the Outlook object model is called from a background thread.



Andrei Smolin
Add-in Express Team Leader
Posted 05 Aug, 2016 03:28:57 Top