Force Outlook to register in ROT (Running Object Table) on launch

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

Force Outlook to register in ROT (Running Object Table) on launch
 
Nick Williams




Posts: 23
Joined: 2018-03-03
Hello,

We have an Add-in Express add-in running in Outlook and another system tray application that communicates with Outlook. The problem is that the calls from the external process using:

Dim outlookApp = DirectCast(Marshal.GetActiveObject("Outlook.Application"), Application)

Fail with the error:

Operation unavailable (Exception from HRESULT: 0x800401E3 (MK_E_UNAVAILABLE))

Apparently Outlook does not register with the ROT until it loses focus.

So can I use Add-in Express for force ROT registration? Or force Outlook to lose focus and refocus on launch?

Any help would be much appreciated.

Thanks
Nick
Posted 03 May, 2019 07:07:50 Top
Dmitry Kostochko


Add-in Express team


Posts: 2841
Joined: 2004-04-05
Hi Nick,

I think you can try to call the RegisterActiveObject function in the code of your Outlook add-in.
Posted 03 May, 2019 07:53:58 Top
Nick Williams




Posts: 23
Joined: 2018-03-03
Hi Dmitry,

I don't suppose you have a .NET related example? That appears to be C++. Also what add-in express event would I use to invoke a similar method?

Thanks
Nick
Posted 03 May, 2019 08:01:20 Top
Dmitry Kostochko


Add-in Express team


Posts: 2841
Joined: 2004-04-05
Hi Nick,

I don't suppose you have a .NET related example?


No, I don't have a .NET example.

Also what add-in express event would I use to invoke a similar method?


I think it shall be a startup event, AddinInitialize or AddinStartupComplete.
Posted 03 May, 2019 10:43:18 Top