Why OnStartupComplete is not called.

  • Thread starter Thread starter Vladimir Chtchetkine
  • Start date Start date
V

Vladimir Chtchetkine

.. if my add-in is loaded in Outlook via Tools->COM Add-Ins command? When my
add-in is loaded along with the Outlook this routine is called. Most
importantly, how do I deal with this "two ways" loading? I've divided my
add-in's init process into two parts and I need both of them to run.

TIA,

Vladimir
 
Don't bother with or rely on OnStartupComplete for that. It only fires when
Outlook is started up, not when an addin is connected using the COM AddIns
dialog.

What you should be doing is using the On_Connection event handler for all
your initializations.

The ConnectMode argument passed into On_Connection will tell you how the
addin was connected, if you need to know that for some reason. If
ConnectMode = cm_AfterStartup then the user connected the addin using the
dialog. If ConnectMode = cm_Startup the addin was started when Outlook was
started.
 
Back
Top