在outlook中使用ConversationID过滤邮件

时间:2014-11-17 14:35:53

标签: c# outlook-addin

是否可以使用ConversationID过滤Outlook中的邮件?

这是我尝试过的(过滤主题):

        Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application();
        Microsoft.Office.Interop.Outlook.MAPIFolder oInbox = Globals.ThisAddIn.Application.Session.Folders["abc@gmail.com"].Folders["Inbox"];
        string sFolderPath = oInbox.FolderPath;
        string sScope = "SCOPE ('deep traversal of \"" + sFolderPath + "\"')";
        string sFilter = "\"urn:schemas:mailheader:subject\" LIKE '%search%'";
        oApp.AdvancedSearchComplete += new ApplicationEvents_11_AdvancedSearchCompleteEventHandler(oApp_AdvancedSearchComplete);
        Microsoft.Office.Interop.Outlook.Search oSearch = oApp.AdvancedSearch(sScope, sFilter, false, "Search results" + DateTime.Now.ToString());
        Microsoft.Office.Interop.Outlook.MAPIFolder oSearchFolder = oSearch.Save("Search results" + DateTime.Now.ToString());

我已经检查了Display email in Outlook by using ConversationID。它说要使用entryId进行搜索,但我需要conversationId。

感谢任何帮助。

提前致谢。

0 个答案:

没有答案