outlook.MAPIFolder selectedFolder = m_applicationObject.ActiveExplorer().CurrentFolder;
string expMessage = "Your current folder is " + selectedFolder.Name + ".\n";
string itemMessage = "Item is unknown.";
try
{
if (m_applicationObject.ActiveExplorer().Selection.Count > 0)
{
Object selObject = m_applicationObject.ActiveExplorer().Selection[1];
if (selObject is outlook.MailItem)
{
outlook.MailItem mailItem = (selObject as outlook.MailItem);
itemMessage = " The subject is " + mailItem.Subject + ". \n";
itemMessage += " The Email is " + getSenderEmailAddress(mailItem) + ".\n";
itemMessage += " The name is " + mailItem.SenderName + ".\n";
itemMessage += " The Desc is " + mailItem.Body + ".\n";
//body consist of too many emails and its replies. is there any way i can extract latest email content from mailitem.Body
// mailItem.Display(false);
}
}
}
在上面的代码中,我正在从Outlook插件中提取电子邮件详细信息正文包含太多电子邮件及其回复。有什么办法可以从mailitem.Body
]中提取最新的电子邮件内容?
outlook.MAPIFolder selectedFolder = m_applicationObject.ActiveExplorer()。CurrentFolder;字符串expMessage =“您当前的文件夹是” + selectedFolder.Name +“。\ n”; ...
Outlook对象模型不提供任何可用的功能。没有简单而简单的方法来提取邮件正文以获取最新回复。