Question

Is there an event in Microsoft Outlook 2010 which one can subscribe on, in order to known when Outlook has finished initializing and all components, folders etc. have been loaded?

Was it helpful?

Solution 2

Ok, I found out what I needed to do...

...

private void ThisAddInStartup(object sender, EventArgs e)
{

    this.Application.Startup += ApplicationStartup;
    this.Application.ItemLoad += ApplicationItemLoad;

 }

 void ApplicationItemLoad(object Item)
 {
     //Do something   
 }

 private void ApplicationStartup()
 {
     //Do something
 }

...

http://msdn.microsoft.com/en-us/library/ff869298.aspx

OTHER TIPS

Not sure about VSTO but good ol' COM addins get the StartupComplete "event" (via IDTExtensibility2) for exactly that purpose.

Not that I'm aware of. Usually, addins don't do anything that requires talking with many outlook objects till some triggering event happens (like opening a mail, or creating a new inspector) so THAT'S when you'd typically see some custom code hooked in.

In my addins, the code connected to startup does things like load up some config, and maybe connect to a DB (although even that I tend to do on demand vs once at startup).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top