问题
BACKGROUND:
Currently I am searching Outlook.MailItems where their UserProperty (here, "IsProcessed") is equal to its propertyValue (here, true or false).
string propertyValue = "true";
string filter = "http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/IsProcessed LIKE \'%" + propertyValue + "%\'";
I am using this filter string in advancedSearch link to doc
PROBLEM STATEMENT:
My usecase is to search if these mailItems have any UserProperty assigned where name of UserProperty = "IsProcessed".
Is there any way to do so using similar DASL filter string?
Thanks.
回答1:
No, you need to know the GUID. All use properties in OOM use the GUID of {00020329-0000-0000-C000-000000000046}
(which is PS_PUBLIC_STRINGS
).
Take a look at existing messages with OutlookSpy (select the message, click IMessage button) - when you select a named property (bolded) OutlookSpy will show its GUID, id, and the DASL name.
来源:https://stackoverflow.com/questions/52468148/how-to-search-for-the-name-of-the-userproperty-in-outlook-mailitems-not-their-v