I'm trying to figure out why ActiveExplorer is returning NULL when the user is a new user login (logged into windows for the first time) and then start outlook for the first time, ActiveExplorer return NULL and we cannot display our command bar and menu bar.
If the user exit Outlook and then start Outlook again, ActiveExplorer return a pointer to ExplorerPtr and then we can display our command bar and menu bar.
Is there something else we can get ExplorerPtr when a user run Outlook for the first time for a new windows user that login for the first time?.
Hi,
I'm exactly facing the same issue where ActiveExplorer() is returning NULL.
Details as below
------------------
i. using Outlook 2010.
ii. a COM add-in extending IDTExtensibility2
iii. In the OnConnection() method, I'm calling ActiveExplorer().
Issue
----------
1. When Outlook is launched by double-clicking the icon, everything works fine. i.e ActiveExplorer() return a valid value. It doesn't return NULL. All is well here.
2.
But in some of the cases (when winword is opened, as as explained in this thread), Outlook gets launched with a command line argument '-Embedding' in which case, it would be running in the background without any 'User Interface'.
In this case, ActiveExplorer() returns NULL when OnConnection() is called.
Now, when Outlook is launched by double-clicking, new outlook process gets launched and exits where as the old outlook instance that has been running in background is brought to foreground, displaying the User Interface.
I tried to make a call to ActiveExplorer() on the saved object, CComQIPtr <Outlook::_Application> in GetCustomUI method of the interface IRibbonExtensibility
ActiveExplorer() returns NULL value, still.
For case(2), how can I get ActiveExplorer() to return a Non-Null value when Outlook comes to foreground so that I can register for the events folder change/view change/selection change.
Thanks.