I see a number of answers on StackOverflow suggesting to use PR_SEARCH_KEY for getting a unique identifier of Outlook.MailItem (and, presumably, Outlook.Folder) this way in VSTO (for Outlook 2007 - 2016):
Folder.PropertyAccessor.BinaryToString(Folder.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x300B0102");
However, this throws a COMException (0x8004010F):
The property "http://schemas.microsoft.com/mapi/proptag/0x300B0102" is unknown or cannot be found.
From the answer below it looks like this is irrelevant, but I tried to open http://schemas.microsoft.com/mapi/proptag/0x300B0102 in a web browser which resulted in
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Is there a different DASL property tag I should be using? Is there a different way to get PR_SEARCH_KEY these days? Is there a different unique identifier that has replaced PR_SEARCH_KEY?
Looking the folder with OutlookSpy, I see the following - no PR_SEARCH_KEY... it's the first time I use OutlookSpy, so I can't tell if this looks suspicious or not.
This is not a URL, this is a DASL property tag. The DASL name in your case simply refers to a MAPI property tag with the value of 0x300B0102.
Take a look at http://www.dimastr.com/redemption/utils.htm#xmapi to read about MAPI properties. You might also want to look at various MAPI objects in Outlook using OutlookSpy (click IMAPIFolder, IMessage, etc.)
That being said, I have never seen that property missing from a message or a folder. Do you see PR_SEARCH_KEY for that folder in OutlookSpy if you click IMAPIFolder? What kind of a message store is it?
User contributions licensed under CC BY-SA 3.0