MLJ
MLJ

Reputation: 133

Ready event in Microsoft Outlook 2010?

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?

Upvotes: 0

Views: 1471

Answers (3)

MLJ
MLJ

Reputation: 133

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

Upvotes: 1

Oliver Giesen
Oliver Giesen

Reputation: 9459

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

Upvotes: 1

DarinH
DarinH

Reputation: 4889

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).

Upvotes: 0

Related Questions