Search code examples
outlookvstointeropoutlook-addinoffice-addins

VSTO Outlook: How to know if the window being opened is the compose window


I have an scenario in which I need to know if the window being opening is the compose window (that opened when you click on New mail). How can I do it?


Solution

  • Check the value of the Inspector.CurrentItem.Sent property. Make sure Inspector.CurrentItem is actually a MailItem object first.