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
Michael Bauer - 26 Apr 2006 05:56 GMT
Am 25 Apr 2006 00:10:37 -0700 schrieb MortenL:
If you don´t find that tool: Maybe it´s an option to save the MSG first as
HTML and then convert that? http://www.freevbcode.com/ShowCode.asp?ID=3605

Signature
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --
> Hello,
>
[quoted text clipped - 24 lines]
> Regards,
> Morten
MortenL - 26 Apr 2006 08:43 GMT
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
Michael Bauer - 26 Apr 2006 13:45 GMT
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.

Signature
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --
> Thank you very much for your suggestion.
>
[quoted text clipped - 14 lines]
> Regards,
> Morten
MortenL - 03 May 2006 13:07 GMT
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
Michael Bauer - 03 May 2006 14:15 GMT
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.

Signature
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --
> Thank you for your help.
>
[quoted text clipped - 5 lines]
>
> Morten
Svetlana Cheusheva - 19 May 2006 16:26 GMT
Morten,
To switch off Outlook security you can aslo use Outlook Security
Manager from http://www.add-in-express.com/outlook-security/
Regards,
Svetlana Cheusheva
cjohnso3@gmail.com - 19 May 2006 21:42 GMT
I think priasoft has some tools that will convert email to PDF, TIFF,
PNG, ect. May help you out. www.priasoft.com
L8r
Kevin - 03 May 2006 03:45 GMT
Hello Morten
I'm doing a similar project, and achieved my results using a 3rd party
application called EZDetatch - www.techhit.com
Regards
Kevin
> Hello,
>
[quoted text clipped - 24 lines]
> Regards,
> Morten