How to search for the name of the UserProperty in Outlook.MailItems, not their value

梦想与她 提交于 2019-12-23 01:08:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!