Search code examples
c#outlookoutlook-addinoffice-interopoffice-automation

How to get save confirmation dialog result of outlook


I don't know how to get result of save confirmation dialog of outlook (in C#). This confirmation box is opened up by following:

  • Open mail in outlook
  • Made some changes in content
  • Close the mail

Please refer this image

I want to get this opened save confirm box and its result. Thanks in advance.


Solution

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