|
-
Jun 29th, 2005, 05:36 AM
#1
outlooks Application_startup event doesn't always fire
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.
-
Jun 30th, 2005, 06:25 AM
#2
Re: outlooks Application_startup event doesn't always fire
No idea ... possibly some sort of security is stopping the code?
You'd have to make a module of all the events, and debug.print them to the immediates window. Save n close. Restart and see which fire. close and restart the app, see what happens.
Possibly windoze/ms did something to hold it in the background, or running under something else. Who knows (ms?) Have a go and see what happens. Maybe it is something which only fires once per day, and once ran it thinks it doesn't need to re-run it...
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Jun 30th, 2005, 07:44 AM
#3
Re: outlooks Application_startup event doesn't always fire
Bizarre, the startup event now seems to be firing every time. I think a gremlin's laughing at me from inside my laptop.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|