Parsing an outlook message file

Dear Sir/Madam,

I was parsing an outlook message using aspose.network api, in the resulting attachments, I did get embedded objects, which I do not need. Is there a way for me to identify and ignore such embedded objects when I iterate through the attachments collection ?


This message was posted using Aspose.Live 2 Forum

Hi,


Thank you for inquiry.

Could you please post a sample MSG file here for our analysis? We will look into it.

You may either post in the forum or zip/send via email using this forum “Contact” --> “send saqib.razzaq an email”.

Hi,


You can differentiate between an embedded and regular attachment using the MapiMessage instance as follows:

MapiMessage msg = MapiMessage.FromFile(@“sample.msg”);
foreach (MapiAttachment att in msg.Attachments)
{
// Embedded attachments have the following MAPI property values
if (att.Properties.Contains(0x3712001E) || att.Properties.Contains(0x3712001F))
{
Console.WriteLine("Embedded Attachment File Name: " + att.LongFileName);
}
else
{
Console.WriteLine("Regular Attachment File Name: " + att.LongFileName);
}
}

The issues you have found earlier (filed as 23767) have been fixed in [this update](http://www.aspose.com/community/files/51/.net-components/aspose.network-for-.net/entry288556.aspx).

This message was posted using Notification2Forum from Downloads module by aspose.notifier.