Is there a way to determine if MailItem
is MailItem
in the ReadMail view
(not sure of the terminology here) or in the Compose view
. That is, I open a letter that was sent to me, or I open a letter to send to someone.
I checked MailItem and Inspector objects, but did not find anything suitable. Unfortunately, I don’t know how to access certain properties (I saw the GetProperty()
method somewhere), so I don’t know if I can access it through this.
I was hoping that I could do something like:
// where OutlookApp is my Outlok Application Outlook.Inspector inspector = OutlookApp.ActiveInspector(); Outlook.MailItem item = inspector.CurrentItem as Outlook.MailItem; if (item.IsOpenInComposeView) { // ... }
source share