Monitor Quit/Close of Outlook Window

M

Markus Kling

Hi,

I would like to build an Outook plugin that gets notified when Outlook
closes. Under some circumstances the user should be able to cancel the
"Outlook shutdown" this way.

I did not find an appropriate Event definition I could attach on. Is there
any?

Thanks for you're support.
Markus
 
M

Michael Bauer

On Fri, 5 Aug 2005 06:19:02 -0700 Markus Kling wrote:

Markus, from within OL (same process) you can subclass and watch for the
WM_CLOSE window message. If your code runs in its own process then you´d
need a hook written in C e.g. (not possible with VB).

Additionally you need to watch the event(s) fired by the commandbar
button(s) "Close" (and "LogOf and Close", depending on your OL version).
 
M

Markus Kling

Hi Sue,

thanks for your reply.

I was searching for an event definition that allows me to cancel the
close/quit event. I think that's not possible with the "Explorer.Close" hook
up.

Am I wrong?

Thanks,
Markus


Use the Explorer.Close event. The Items Command Bar sample from
http://www.microeye.com is a good example.
 
M

Markus Kling

Hi Micheal,

hmm WndProc ... we skip that one for now ;)

I was searching for an event definition that allows me to cancel the
close/quit event. I think that's not possible with the Close, and LogOf and
Close event defintions.

Am I wrong?

Thanks for your reply,
Markus
 
M

Michael Bauer

On Sat, 6 Aug 2005 18:19:51 +0200 Markus Kling wrote:

Hi Markus,

each Button_Click event has a cancel argument that you can set to False. But
that´s just the half: The user can press ALT+F4 e.g. For the ability to
cancel that you´d need subclassing.
 
S

Sue Mosher [MVP-Outlook]

If you want to cancel when Explorer.Close fires, you could show a new Explorer window. The potentially difficult part would be deciding what folder to show, but you could track that as a separate variable.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top