Hi,
I am converting above mentioned file formats to html using Aspose.Words.dll. Please guide me how to remove all the hyper links from HTML file. and also let me know how to fix the below issue.
The HTML file generated from MHT file contains the "Subject:
Attachments:ATT00001.vnd.ms-officetheme" above the actual message. Please let me know the reason for this and also provide me the solution to avoid these extra line's.
Please find the sample file and output file from the attachment.
code i am using for conversion:
//load email message into an instance of MailMessage var message = Aspose.Email.Mail.MailMessage.Load("C:\\temp\\message.mht");
//create an instance of MemoryStream to store the intermediate data (mhtml) var stream = new System.IO.MemoryStream();
//convert the email message to MHTML and store in MemoryStream message.Save(stream, MailMessageSaveType.MHtmlFromat);
//create an instance of LoadOptions and set the LoadFormat to Mhtml var loadOptions = new Aspose.Words.LoadOptions(); loadOptions.LoadFormat = LoadFormat.Mhtml;
//create an instance of Document and load the MTHML from MemoryStream var document = new Aspose.Words.Document(stream, loadOptions);
//create an instance of HtmlSaveOptions and set the SaveFormat to Html var saveOptions = new Aspose.Words.Saving.HtmlSaveOptions(SaveFormat.Html);
//save the document to Html file document.Save("C:\\temp\\output.html", saveOptions);
Please find the below link for your reference.
http://www.aspose.com/community/forums/354291/eml-to-html-file-conversion/showthread.aspx#354291
Thanks,
Dhivya