Custom Form Close Function

G

Guest

Hi,
I display the email information in one of our custom forms. The problem
is, when the user tries to close the form, it is asking "do you want to
save" with yes, no and cancel options.

I do not want this save message to appear and the form should close without
asking anything. I tried to write a function item_close() in the form and
close the item with return value of 1 but still I get that message.

can anybody tell me what can I do to prevent the users from getting that
message?

Thanks in advance.
 
S

Sue Mosher [MVP-Outlook]

You can't prevent the user from getting that message if the item has changes
and has not been saved.
 
A

An Dong

Hello,
in general, if you don't want to be asked for confirmation, try Item.Close(0)
AnDong
 
S

Sue Mosher [MVP-Outlook]

That won't work if the user clicks the CLose button. Try it with MsgBox
statements in both Item_CLose and Item_Write to see the event order.

--
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