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

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

    Hi
    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-
    http://pdfsharp.codeplex.com/

    Thanks,
    Ashutosh Jha
    http://tricksroad.com

  • #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.

    Regards,
    Nirav Prabtani (Senior Web Developer)
    Email : niravjprabtani@gmail.com
    blog : niravprabtani.blogspot.in

  • #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:

    http://www.verypdf.com/wordpress/201206/how-to-convert-msg2pdf-28221.html
    http://www.coolutils.com/TotalMailConverter

    Hope it will be helpful to you.

    Regards,
    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)
    pawansoftit@gmail.com

  • #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.
    http://support.leadtools.com/CS/forums/ShowPost.aspx?PostID=44186
    There are lots of samples on the internet on how to do this.


  • Sign In to post your comments