问题
I want to get the last reply in an Outlook Conversation from a MailItem. I don't want to get the whole mail.
I tried to get the messages of MailItem but I couldn't, every time I got the whole email, not only the last reply.
Outlook.MailItem item = Items.GetLast();
MessageBox.Show(item.Body);
I expected to get only the last reply message from the mail thread but I got the whole mail instead!
回答1:
It is your responsibility to parse the message body and extract the latest text. Keep in mind that you might not be able to do that since nothing prevents the user from typing inside the previous replies rather than only at the top (or bottom) of the message.
来源:https://stackoverflow.com/questions/56145308/how-to-get-last-reply-of-a-mailitem-from-outlook-in-c