We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to delete the particular attachment in outlook

Hi sir

From your post i take this lines

in this it delete the all attachment.

In my email i have 4 attachment i want to delete 2 & 4th attachmetn remaining attachment i want to save as .msg format

Hi Senthil,

Thank you for writing to Aspose support team.

You may please use following sample code to remove required attachments from the MapiMessage and let us know the feedback.

var message = MapiMessage.FromFile(@“C:\temp\SampleMessage.msg”);<o:p></o:p>

var attachments = message.Attachments;

MapiAttachment att1 = attachments[1];

MapiAttachment att2 = attachments[3];