I found something rather odd today while playing around in outlook and I wondered if anyone else had experienced it and/or knew what caused it. I wanted to create an outlook.application object with events when outlook starts. As far as I know this should have done it:-

Public WithEvents outlook As Application

Private Sub Application_Startup()
Set outlook = CreateObject("Outlook.Application")
End Sub

I noticed, though, that some of my events weren't firing. I added a megbox as the first command of the startup event and discovered it was only firing a fraction of the time (so the events I wrote for outlook were in turn not firing).

A colleague tells me that sometimes outlook doesn't actually close when it appears to so maybe when I restarting I wasn't really starting the app but was 'waking it up'. I don't think that's the reason though because even a after a full reboot the startup event just doesn't fire sometimes.

I've already found get arounds to do everything I want but I was curious to see if anyone knew anything about this as I'm sure it'll trouble me again sooner or later.