You must Sign In to post a response.
  • Category: General

    Convert .msg file to PDF using C# programatically without using interop dlls.

    how to convert .msg file to PDF using C# programatically without using any interop dlls.
  • #750981
    Hi Kavita,

    You can convert the .MSG files in to PDF. For while importing the msg file save it as .pdf using programming like below-

    MItem.SaveAs(strFolderPath & "\" + MItem.SenderName.ToString + " " + rTime + ".pdf", Outlook.OlSaveAsType.olpdf)

    Also better you can use PDF Sharp library for this. folllow the below link-

    Ashutosh Jha

  • #750983
    Hello Kavitha,

    Why you dont want any third party ?
    Any specific reason for that?
    Sometimes we wants to perform that kind of opertation which can not be performed by .net classes.
    So thin this case you have to set reference of third party and you have to code with the help of dlls.
    So in your case also you have to search regading that in google , you will get solution for sure.

    Nirav Prabtani (Senior Web Developer)
    Email :
    blog :

  • #751418
    Hai Kavitha,
    If you want the .msg file to be converted to .pdf then you can use some 3rd party libraries and add-ons which can be helpful to you.
    The addon or the API's will be helpful in these cases.Document Printer is one software which can be downloaded free of cost and can be used.
    Below is the link of an API which can be used:

    Hope it will be helpful to you.

    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)

  • #756470
    I have to agree with Pawan & Nirav because using a library is the best and fastest way to do the conversion you want.
    If found the following forum that has project that does something similar.
    There are lots of samples on the internet on how to do this.

  • Sign In to post your comments