Hi I'm doing a bit of a tutorial - the super-easy guide to outlook object model - from MS
One of the "hands on" examples is supposed to fire off an email when the application_quit() event occurs.
The first time I tried to quit outlook I got an error stating that (ummm can't remember error and can't reproduce (sorry!)) but the debug button took me to the Set NewMail = ThisOutlookSession.CreateItem(olMailItem) line.
I changed nothing. Now I get no error but the sub is not run!
I've pasted the very simple sub below together with the _quit() call to the sub.
Outlook 2000 SR1 (Win2k) Exchange Client.
Private Sub Application_Quit()
Set NewMail = ThisOutlookSession.CreateItem(olMailItem)
NewMail.Subject = "please open this email and make your lunch choice"
NewMail.Body = "use the voting buttons to make your selection"
NewMail.VotingOptions = "Subway; McDonalds; Kebab; KFC"
Set receiverOfMyMail = NewMail.Recipients.Add("removed to fight spam")
the email address above is set to a valid account in real life.
the macro works fine if not invoked via the quit() event.