Custom Form Close Function

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
You can't prevent the user from getting that message if the item has changes
and has not been saved.
 
Hello,
in general, if you don't want to be asked for confirmation, try Item.Close(0)
AnDong
 
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
 
Back
Top