I don't know how to get result of save confirmation dialog of outlook (in C#). This confirmation box is opened up by following:
I want to get this opened save confirm box and its result. Thanks in advance.
Track the MailItem.Close
/ Write
/ AfterWrite
events - Close
will fire immediately before the prompt is shown, Write
fires before the message is saved, AfterWrite
immediately afterward.
There is no trivial way of getting such information. But you may track the sequence of events fired for the item and realize the answer following that way.
First, to handle item-level events you may develop a wrapper for an Outlook item like described in the Implement a wrapper for inspectors and track item-level events in each inspector article.
The MailItem.Close event is fired when the inspector associated with an item (which is an instance of the parent object) is being closed.
The MailItem.Write event is fired when an instance of the parent object is saved, either explicitly (for example, using the Save
or SaveAs
methods) or implicitly (for example, in response to a prompt when closing the item's inspector).
So, if you have got Close
fired following by the Write
event - that is your case!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.