如何在 folder.items.Restrict中使用PR_SEARCH_KEY获取物品,并使用兑换方式。

问题描述 投票:0回答:1

我从mailitem中用redemption得到PR_SEARCH_KEY,值是PT_Binary格式,我不知道如何在C#中用redemption把它转换成字符串。

我试着从文件夹中搜索项目,结果发现PR_SEARCH_KEY的值是PT_Binary格式。我的获取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); 

但我不知道如何从searchkey值中创建过滤字符串。

我看了一些帖子,他们都是转换成字符串,然后像往常一样使用redemption创建它。我需要有人帮助从文件夹中获取项目。

enter image description here

谢谢。

c# outlook-redemption
1个回答
1
投票

你需要指定DASL名称(引号)和值的十六进制表示。

"http://schemas.microsoft.com/mapi/proptag/0x300B0102" = '10ABF5...'
© www.soinside.com 2019 - 2024. All rights reserved.