How to convert MSG files to PDF

  • Thread starter Thread starter MortenL
  • Start date Start date
M

MortenL

Hello,

I need to convert MSG files to PDF through an automation process.

I first thought of opening the MSG file in Outlook and saving it as a
PostScript file and then to convert the Postscript file to PDF using
Acrobat Distiller.

I thought of using something like this

Dim outlookappl As Outlook.Application
Dim outlookitem As Outlook.MailItem
Set outlookappl = New Outlook.Application
Set outlookitem = outlookappl.CreateItemFromTemplate("C:\Test.msg")
outlookitem.PrintOut
outlookitem.Close (olDiscard)

But it seems like the PrintOut method does not accept a filename
parameter like the PrintOut method for Word does.

I've also been looking at Outlook's SaveAs method but the warning
message that pops up requires user intervention and that's no good for
my solution.

Please help me.

Regards,
Morten
 
Thank you very much for your suggestion.

However, I could find no way of saving the file as an HTML file without
using the method SaveAs.

When using the method SaveAs a message pops up saying "A program is
trying to access data from Outlook that may include address book
information. Do you want to allow this?"

Then a user has to press the Yes button, but since I want my
application to be all automatic there won't be any user to press any
button.

Does anyone have any suggestions how to save the MSG file in another
format (e.g. HTML) without any message boxes popping up ?

Regards,
Morten
 
Am 26 Apr 2006 00:43:25 -0700 schrieb MortenL:

in OL 2003 you can avoid that message by using the instrinsic Application
object instead of one created by CreateObject.

Another approach is to use the Redemption from www.dimastr.com.
 
Thank you for your help.

I have now with success used a tool from http://www.contextmagic.com/
called ClickYes Pro. This tool eliminates the warning message that pops
up when I'm using the SaveAs method on the mail item. I then saved the
mail as HTML (or TXT) and after that I could convert to PDF using
Microsoft Word and Adobe Distiller.

Morten
 
Am 3 May 2006 05:07:45 -0700 schrieb MortenL:

Morten, that tool doesn´t "eliminate" the prompt. Instead it clicks the Yes
button every time the dialog pops up. So you never know whether your code
forced that dialog or any other bad one.
 
I would like to suggest the TrustVare MSG to PDF Converter Tool is a user-friendly solution to convert MSG files to PDF. It helps to convert all Outlook data which is saved in an MSG format file with all attachments in Adobe PDF format. It is an easy tool to save and print Outlook files and store data at selected locations as per user's demand. All users can use this software, and the file has no condition. You get a choose file-selected option to select MSG files for export as per the size assessed by the tool, by this, you can convert an Outlook file to PDF format. Users can install this tool on all Windows versions of operating systems.
 
If you are looking for a solution to convert MSG files to PDF then you can use this WholeClear MSG to PDF Converter Software will convert your MSG files to PDF without losing any data. The software may export MSG files of any size to PDF format. Some users can convert whole MSG files to PDFs all at once. This software can also convert MSG files to PDF files for both non-commercial and commercial purposes. The utility provides a free demo version for users to familiarise themselves with the application's features and operations.
 
Back
Top