如何从“已发送邮件"文件夹中获取准确的已发送电子邮件? [英] How, can get the exact sent Email from Sent Items folder?
问题描述
VSTO:Outlook 2007 插件项目.
VSTO: Outlook 2007 Add-In Project.
我使用功能区控件中的自定义按钮发送了一个示例电子邮件.现在,如何从 Sent Items 文件夹中获取 sampleEmail?
I have Sent an sampleEmail using a custom button in the Ribbon control. Now, How, can get the sampleEmail from Sent Items folder?
我尝试使用条目 ID 属性.但这在发送电子邮件后没有有帮助.
I tried by using the Entry ID property. but that was not helpful after the Email is sent.
新电子邮件的对话 ID 为空.
The Conversation ID is null for a new Email.
任何其他属性,通过它我可以准确地阅读我发送的电子邮件.
Any other property, by which I can exactly read an Email that I have sent.
推荐答案
您可以在使用 MailItem.UserProperties 或 ailItem.PorpertyAccesor 发送项目之前为其设置命名属性,然后在已发送项目"文件夹 (MAPIFolder.Items.Find).
You can set a named property on the item before sending it using MailItem.UserProperties or ailItem.PorpertyAccesor, then search for that property in the Sent Items folder (MAPIFolder.Items.Find).
更新.MAPIFolder.Items.Add
的查询将是
set item = MAPIFolder.Items.Find("@SQL=""http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Spartan"" = 'test123' ")
这篇关于如何从“已发送邮件"文件夹中获取准确的已发送电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!