<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Convert a .msg file to .pdf in University Forum</title>
    <link>https://community.blueprism.com/t5/University-Forum/Convert-a-msg-file-to-pdf/m-p/113063#M3719</link>
    <description>&lt;P&gt;Try creating object with this code mentioned below&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Library imports&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Microsoft.Office.Interop.Outlook&lt;BR /&gt;System.IO&lt;BR /&gt;iTextSharp.text&lt;BR /&gt;iTextSharp.text.pdf&lt;/P&gt;&lt;P&gt;Code State Input Parameters - Action Page - MSG to PDF&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Input Parameters&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;msgFilePath: The file path of the .msg file you want to convert.&lt;/LI&gt;&lt;LI&gt;pdfFilePath: The file path where the output PDF should be saved.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Code Stage&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;' Create an Outlook application instance&lt;BR /&gt;Dim outlookApp As New Application()&lt;BR /&gt;&lt;BR /&gt;' Open the .msg file&lt;BR /&gt;Dim mailItem As MailItem = CType(outlookApp.Session.OpenSharedItem(msgFilePath), MailItem)&lt;/P&gt;&lt;P&gt;' Convert the email body to HTML&lt;BR /&gt;Dim htmlBody As String = mailItem.HTMLBody&lt;BR /&gt;&lt;BR /&gt;' Create a new PDF document&lt;BR /&gt;Dim pdfDoc As New Document(PageSize.A4)&lt;BR /&gt;Dim writer As PdfWriter = PdfWriter.GetInstance(pdfDoc, New FileStream(pdfFilePath, FileMode.Create))&lt;BR /&gt;&lt;BR /&gt;' Open the PDF document&lt;BR /&gt;pdfDoc.Open()&lt;BR /&gt;&lt;BR /&gt;' Add the HTML content to the PDF document&lt;BR /&gt;Using sr As New StringReader(htmlBody)&lt;BR /&gt;XMLWorkerHelper.GetInstance().ParseXHtml(writer, pdfDoc, sr)&lt;BR /&gt;End Using&lt;BR /&gt;&lt;BR /&gt;' Close the PDF document&lt;BR /&gt;pdfDoc.Close()&lt;BR /&gt;&lt;BR /&gt;' Release Outlook COM objects&lt;BR /&gt;System.Runtime.InteropServices.Marshal.ReleaseComObject(mailItem)&lt;BR /&gt;System.Runtime.InteropServices.Marshal.ReleaseComObject(outlookApp)&lt;BR /&gt;&lt;BR /&gt;' Final clean-up&lt;BR /&gt;mailItem = Nothing&lt;BR /&gt;outlookApp = Nothing&lt;BR /&gt;GC.Collect()&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Aug 2024 12:55:42 GMT</pubDate>
    <dc:creator>Parthiban_Viatris24</dc:creator>
    <dc:date>2024-08-13T12:55:42Z</dc:date>
    <item>
      <title>Convert a .msg file to .pdf</title>
      <link>https://community.blueprism.com/t5/University-Forum/Convert-a-msg-file-to-pdf/m-p/113030#M3715</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I have a .msg file which i want to convert to .msg file. I have learned that in order to convert a .msg to .pdf, u need to&lt;/P&gt;&lt;P&gt;1. Open .msg into outlook &amp;amp; save as .html&lt;/P&gt;&lt;P&gt;2. Open .html from word &amp;amp; do save as pdf.&lt;/P&gt;&lt;P&gt;I am looking for an action or vbo code that can do Step #1. Has anyone used a similar functionality earlier ?&lt;/P&gt;&lt;P&gt;PS - My input is .msg. I dont have that email in outlook , so dont have its entry id. Please suggest a way with above mentioned approach or any other approach that does not require spying.&lt;/P&gt;&lt;P&gt;Your help is much appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 17:13:12 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/University-Forum/Convert-a-msg-file-to-pdf/m-p/113030#M3715</guid>
      <dc:creator>sapna_soni0290</dc:creator>
      <dc:date>2024-08-12T17:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Convert a .msg file to .pdf</title>
      <link>https://community.blueprism.com/t5/University-Forum/Convert-a-msg-file-to-pdf/m-p/113063#M3719</link>
      <description>&lt;P&gt;Try creating object with this code mentioned below&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Library imports&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Microsoft.Office.Interop.Outlook&lt;BR /&gt;System.IO&lt;BR /&gt;iTextSharp.text&lt;BR /&gt;iTextSharp.text.pdf&lt;/P&gt;&lt;P&gt;Code State Input Parameters - Action Page - MSG to PDF&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Input Parameters&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;msgFilePath: The file path of the .msg file you want to convert.&lt;/LI&gt;&lt;LI&gt;pdfFilePath: The file path where the output PDF should be saved.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Code Stage&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;' Create an Outlook application instance&lt;BR /&gt;Dim outlookApp As New Application()&lt;BR /&gt;&lt;BR /&gt;' Open the .msg file&lt;BR /&gt;Dim mailItem As MailItem = CType(outlookApp.Session.OpenSharedItem(msgFilePath), MailItem)&lt;/P&gt;&lt;P&gt;' Convert the email body to HTML&lt;BR /&gt;Dim htmlBody As String = mailItem.HTMLBody&lt;BR /&gt;&lt;BR /&gt;' Create a new PDF document&lt;BR /&gt;Dim pdfDoc As New Document(PageSize.A4)&lt;BR /&gt;Dim writer As PdfWriter = PdfWriter.GetInstance(pdfDoc, New FileStream(pdfFilePath, FileMode.Create))&lt;BR /&gt;&lt;BR /&gt;' Open the PDF document&lt;BR /&gt;pdfDoc.Open()&lt;BR /&gt;&lt;BR /&gt;' Add the HTML content to the PDF document&lt;BR /&gt;Using sr As New StringReader(htmlBody)&lt;BR /&gt;XMLWorkerHelper.GetInstance().ParseXHtml(writer, pdfDoc, sr)&lt;BR /&gt;End Using&lt;BR /&gt;&lt;BR /&gt;' Close the PDF document&lt;BR /&gt;pdfDoc.Close()&lt;BR /&gt;&lt;BR /&gt;' Release Outlook COM objects&lt;BR /&gt;System.Runtime.InteropServices.Marshal.ReleaseComObject(mailItem)&lt;BR /&gt;System.Runtime.InteropServices.Marshal.ReleaseComObject(outlookApp)&lt;BR /&gt;&lt;BR /&gt;' Final clean-up&lt;BR /&gt;mailItem = Nothing&lt;BR /&gt;outlookApp = Nothing&lt;BR /&gt;GC.Collect()&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 12:55:42 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/University-Forum/Convert-a-msg-file-to-pdf/m-p/113063#M3719</guid>
      <dc:creator>Parthiban_Viatris24</dc:creator>
      <dc:date>2024-08-13T12:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Convert a .msg file to .pdf</title>
      <link>https://community.blueprism.com/t5/University-Forum/Convert-a-msg-file-to-pdf/m-p/119515#M4273</link>
      <description>&lt;P&gt;To convert .MSG files to PDF, you can use &lt;STRONG&gt;DRS Softech MSG Converter Tool&lt;/STRONG&gt;. This software allows you to &lt;A href="https://www.drssoftech.com/blog/convert-msg-to-pdf/" target="_self"&gt;convert multiple MSG files to PDF in bulk&lt;/A&gt; while maintaining the original formatting, metadata, and attachments. It provides options to preview the emails before conversion and offers advanced filters for selective file conversion. The tool ensures high-quality output without any data loss and is compatible with all Windows versions. With an easy-to-use interface, both technical and non-technical users can efficiently convert MSG files to PDF without hassle.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 05:43:12 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/University-Forum/Convert-a-msg-file-to-pdf/m-p/119515#M4273</guid>
      <dc:creator>jamesrobert15</dc:creator>
      <dc:date>2025-03-21T05:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Convert a .msg file to .pdf</title>
      <link>https://community.blueprism.com/t5/University-Forum/Convert-a-msg-file-to-pdf/m-p/121400#M4387</link>
      <description>&lt;P&gt;If you're looking for a quick way to convert .msg files to .pdf, &lt;STRONG&gt;Softaken MSG Converter&lt;/STRONG&gt; is a tool you can count on. I used it recently to turn a large number of MSG emails into PDF format and it preserved everything: my attachments, formatting, and message details. It supports bulk conversion and doesn’t need Outlook installation and setup, which makes the conversion procedure much easier. It does the job smoothly on all Windows versions and has a clean interface that anyone can use. If you want a simple way to make your MSG emails readable and shareable as PDF files, this tool works great.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 08:58:45 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/University-Forum/Convert-a-msg-file-to-pdf/m-p/121400#M4387</guid>
      <dc:creator>Williebunn</dc:creator>
      <dc:date>2025-07-09T08:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Convert a .msg file to .pdf</title>
      <link>https://community.blueprism.com/t5/University-Forum/Convert-a-msg-file-to-pdf/m-p/123284#M4452</link>
      <description>&lt;P&gt;Thanks for sharing this solution! I was looking for a reliable way to convert MSG files to PDF&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2025 10:38:25 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/University-Forum/Convert-a-msg-file-to-pdf/m-p/123284#M4452</guid>
      <dc:creator>abhilashdogra</dc:creator>
      <dc:date>2025-10-17T10:38:25Z</dc:date>
    </item>
  </channel>
</rss>

