Warning messege

  • Thread starter Thread starter ×מיר עטרי
  • Start date Start date
×

×מיר עטרי

Hello to all,

I have Outlook 2003.
Working with Exchange 2003.

Anyone know how to write a script that will warn me every time i will try to
exit outlook? With a yes / no option to choose.

Thank you so much for your help
Amir :)
 
If you want to be able to cancel the closing of Outlook, you need to trap
the button clicks (File/Close), and subclass the click on the upper right
cross.

If you're looking for a ready-to-use solution, see OLKeeper on my website
(link in my signature).

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Mon, 11 May 2009 02:17:01 -0700 schrieb ×מיר עטרי:
 
Hi there,

Thank you for your answer.
The olkeeper is wonderful, but it is abit expensive for me right now.

Can you explain (to a newbi) how can prevent closing outlook just with vba
code?
i do not need the minimize/close/canel options. i only need the abitlity to
keep outlook open.

Thank you anyway :)

Amir
 
Here's an example that demonstrates how to track a commandbar button click.
Instead of 354 for the Reply button use 1891 for the Exit button:

http://www.vboffice.net/sample.html?mnu=2&pub=6&lang=en&smp=33&cmd=showitem

In the click event use the MsgBox function to ask the user what he wants to
do. If the answer is "don't close Outlook", then set CancelDefault=True.

For the mentioned subclassing of the upper right cross I don't have an
example. That would be up to you.

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Tue, 12 May 2009 06:56:02 -0700 schrieb ×מיר עטרי:
 
Back
Top