could you please help me with the following issue.
I would like to extract the body of an MSG-File to a PDF document with
- inline-attachments being kept and displayed in the body
- outline-attachments being extracted to files
- outline-attachments not being displayed in the footer (as image-Files are) but with their filenames remaining listed in the header
My workaround to achieve this would be:
- extract outline-attachments to files
- then remove outline-attachments from the MailMessage object
- add new empty attachments with the names of the removed ones
Please find attached the solution MsgConverterGUI.zip and take a look at the following Code in Form1.cs:
private static void ConvertUsingPdf(string strMsgFile)
// load the MSG file using Aspose.Network for .NET
MailMessage msg = MailMessage.Load(strMsgFile,
I solved the problem “remove attachment from message but keep it listed in header”-problem by method
It re-adds the attachments without content (zero bytes).
This workaround seems to do fine but it also seems to be a hack.
Do you know a more proper way?
Thank you very much for your excellent support,
all the best,