Initiate PDF from VBA Code

  • Thread starter Thread starter Mark Bruso
  • Start date Start date
M

Mark Bruso

Hi,

I would like to have a some code that will:

- Open a report in Preview Mode (got that)
- Print the report in the PDF format, (changing the printer driver to Adobe
Acrobat)
- Save the document to directory set programatically using variables.
- Attach the document to an email. Address the email from a data in the
database.
- Send the e-mai.

Can this be done. Any suggestions on how to start?
 
Mark:

Stop by our web and look at our PDF and Mail Library for Access. You can do
exactly what you are trying to do with our library.
 
I use a dummy printer that prints to a file with a .PS extension, then spit
that out into a watched file in Distiller. Then I open up an Outlook
session, attach the result, and send. Works great.

The following KB article might help if you're not familiar with the Outlook
object model:

http://support.microsoft.com/default.aspx?scid=kb;en-us;209948

Feel free to e-mail me if you want me to send you the code that I use.
 
Back
Top