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); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)