如何使用兑换在 folder.items.Restrict 中使用 PR_SEARCH_KEY 获取物品
How to get items using PR_SEARCH_KEY in folder.items.Restrict using redemption
我使用兑换从 mailitem 获得了 PR_SEARCH_KEY,值是 PT_Binary 格式。我不知道如何在 C# 中使用赎回将其转换为字符串。
我试图从文件夹中搜索项目。我获得 PR_SEARCH_KEY 的代码是
string PR_SEARCH_KEY = "http://schemas.microsoft.com/mapi/proptag/0x300B0102";
var searchKeyValue= mailItem.Fields[PR_SEARCH_KEY];
我尝试执行
var existingItem = folder.Items.Restrict(filter);
但我不知道如何从搜索键值创建过滤字符串。
我读了一些 post,它们正在转换为字符串,然后像往常一样使用兑换创建它。
我需要有人帮助我从文件夹中获取项目。
谢谢
您需要指定 DASL 名称(引号)以及值的十六进制表示形式:
"http://schemas.microsoft.com/mapi/proptag/0x300B0102" = '10ABF5...'
我使用兑换从 mailitem 获得了 PR_SEARCH_KEY,值是 PT_Binary 格式。我不知道如何在 C# 中使用赎回将其转换为字符串。
我试图从文件夹中搜索项目。我获得 PR_SEARCH_KEY 的代码是
string PR_SEARCH_KEY = "http://schemas.microsoft.com/mapi/proptag/0x300B0102";
var searchKeyValue= mailItem.Fields[PR_SEARCH_KEY];
我尝试执行
var existingItem = folder.Items.Restrict(filter);
但我不知道如何从搜索键值创建过滤字符串。
我读了一些 post,它们正在转换为字符串,然后像往常一样使用兑换创建它。 我需要有人帮助我从文件夹中获取项目。
谢谢
您需要指定 DASL 名称(引号)以及值的十六进制表示形式:
"http://schemas.microsoft.com/mapi/proptag/0x300B0102" = '10ABF5...'