我有一个自治/IManage(文档管理系统)应用程序,这是集成在Microsoft outlook中,它为您提供了一个不同的邮件项目部分的结果,如标题,版本的文件,作者等我需要自动化这个应用程序使用编码的UI,但我不能选择的结果,就像一个收件箱的结果在另一个邮件项目部分。我在网上搜索,想找一个插件以外的替代插件来获取这些结果,但除了编码的ui扩展插件之外,我找不到其他的插件。
有没有办法从outlook中捕获这些项目?或者,如果我需要得到一个编码的ui扩展插件,谁可以提供谁已经有一个插件。
发布于 2012-10-05 14:38:35
我是通过OOM做到的。我使用发件人的电子邮件地址和电子邮件主题来查找邮件。代码如下。
private string SelectMail(string addressTag, string subject)
{
Outlook.Application app = new Outlook.Application();
Outlook.Explorer explorer = app.ActiveExplorer();
explorer.ClearSelection();
string senderEmail = Utils.Setting.Get(addressTag);
IEnumerable<Outlook.MailItem> selectedMails = from Outlook.MailItem mailItem in explorer.CurrentFolder.Items
where mailItem.SenderEmailAddress == senderEmail && mailItem.Subject == subject
select mailItem;
Outlook.MailItem mail = selectedMails.FirstOrDefault<Outlook.MailItem>();
explorer.AddToSelection(mail);
return mail.Subject;
}https://stackoverflow.com/questions/11357078
复制相似问题