I am trying to determine sender of a email in Outlook 2007 and above. In Outlook 2010 you have a Sender
property on the MailItem
object while in Outlook 2007 you have to do it differently like mentioned in this question.
So now I need to know whether current version of Outlook supports the Sender
property, and if it does not, use the other method. The reason for doing this is I would prefer to use the Sender
property for compatibility with future versions of Outlook rather than having condition on version of Outlook.
So the question is how do I determine whether a property exists in Outlook Interop ? Obviously, this being a COM object I cannot use reflection here.