3

我正在使用 Outlook VSTO高级搜索功能从它们各自的PR_MESSAGE_ID中搜索邮件列表。

我的查询看起来像

 http://schemas.microsoft.com/mapi/proptag/0x1035001E = 'targetId1' OR
 http://schemas.microsoft.com/mapi/proptag/0x1035001E = 'targetId2' OR
 http://schemas.microsoft.com/mapi/proptag/0x1035001E = 'targetId3' OR 
 http://schemas.microsoft.com/mapi/proptag/0x1035001E = 'targgetId4' ...etc.

我质疑这种方法的性能,我想知道是否有更优雅的查询,类似于SELECT something WHERE 'MESSAGE_ID' IN (targetId1, targetId2, etc.)

4

1 回答 1

0

不,AdvancedSearch 是正确的选择,因为搜索是在后台执行的,不会阻塞 UI 线程。此外,您可以在多个文件夹中搜索项目。

所有 DASL 查询都以区分大小写的前缀“@SQL=”开头,但Application.AdvancedSearch的 DASL 查询除外。

有关其他替代方案,请参阅过滤项目

于 2015-08-28T11:53:51.580 回答