Is there a way to convert a Task, saved as a MSG file, into a PDF file that looks similar to what is produced with the Print Preview with Outlook?
We have a need to support MSG files as emails, tasks, calendar, notes,contacts and appointments and convert them to PDF. We would like the output, if possible, to be close to the information shown in Outlook’s PrintPreview.
I was able to get the Emails and Appointments pretty close, but am having issues with tasks - it looks like moving to MHTML makes it print as an email with From/Sent/etc.fields and not a task with its Status/Percent Complete/Total Work/etc…
TaskToPDFPrinted.png (29.0 KB)
This is how I am currently creating the PDF file for all MSG files except for Appointments (IPM.Appointment type):
Aspose.Email.Mapi.MapiMessage mailMsg = Aspose.Email.Mapi.MapiMessage.FromFile(FILE_PATH); MemoryStream msHTML = new MemoryStream(); mailMsg.Save(msHTML, msg_so); Aspose.Words.Document htmlEmailDoc = new Aspose.Words.Document(msHTML, word_lo); htmlEmailDoc.Save(OUTPUT_DIR + OUTPUT_NAME, pdf_so);