I work on a VSTO in c#. When I click on button I save attachment in a folder. My problem is : when I have a rich email with an image in the signature, I have a element in my
seeing that this question has some +2k hits and is still not answered, here is my attempt at a static utility method that returns a list of NON INLINE attachments:
///
/// Method to get all attachments that are NOT inline attachments (like images and stuff).
///
///
/// The mail item.
///
///
/// The .
///
public static List GetMailAttachments(Outlook.MailItem mailItem) {
const string PR_ATTACH_METHOD = "http://schemas.microsoft.com/mapi/proptag/0x37050003";
const string PR_ATTACH_FLAGS = "http://schemas.microsoft.com/mapi/proptag/0x37140003";
var attachments = new List();
// if this is a plain text email, every attachment is a non-inline attachment
if (mailItem.BodyFormat == Outlook.OlBodyFormat.olFormatPlain && mailItem.Attachments.Count > 0) {
attachments.AddRange(
mailItem.Attachments.Cast