I am coding a VSTO add-in for Outlook, and in order to access MailItem properties that are not exposed by the Outlook Object Model (such as email header text) the approach put-forth by Microsoft (and here on stackoverflow) is to use code like the following, that has a "http://schemas.microsoft.com" URL:
Outlook.PropertyAccessor oPA = msg.PropertyAccessor as Outlook.PropertyAccessor;
const string PR_MAIL_HEADER_TAG = @"http://schemas.microsoft.com/mapi/proptag/0x007D001E";
try
{
string strHeaders = (string)oPA.GetProperty(PR_MAIL_HEADER_TAG);
}
catch { }
I am trying to understand what the GetProperty method is doing with the http://schemas.microsoft.com URL, and the documentation I found (here and here) has been less than helpful.
Am I correct that these URLs are just labels used to access different object namespaces?
If that's the case, why are they in an http URL format? Will my compiled executable actually reach out to the Internet to grab some info at this URL?
Typing that address into a web browser brings up the message: "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable." So -- it would appear not?
Or is it using the URL to look up a locally stored HTTP document -- that the compiler inserts into the assembly similar to a resource file?
Either way -- what information is the PropertyAccessor.GetProperty method using based on the URL that is passed to it?
I'm leery about using the PropertyAccessor.GetProperty method, especially if it is in fact actually reaching out to the Internet... so any guidance on this, or additional sources I could look-to would be greatly appreciated.