Changing default printer and printing to Acrobat (pdf)

M

-Michelle-

Hi

Using Access 2003

I wonder if it is possible (and how) to print a report to Acrobat Distiller,
save it using a generic name (eg: TaxInvoice.pdf) and then attaching that to
an email in Outlook.

Before printing the document, I need to change the currently default printer
to Distiller, do what I have to do and then change back to whatever the
default printer was.

Any advice appreciated.

Regards
Michelle
 
A

Albert D. Kallal

Well, I can help you with the pritner swtich code!

In access 2002 and later, there is a built in printer object, and it lets
you switch the printer with ease.

You can use:

Set Application.Printer = Application.Printers("HP LaserJet Series II")

So, to save/switch, you can use:

dim strDefaultPrinter as string

' get current default printer.
strDefaultPrinter = Application.Printer.DeviceName

' switch to printer of your choice:

Set Application.Printer = Application.Printers("HP LaserJet Series II")

do whatever you want....

Swtich back.

Set Application.Printer = Application.Printers(strDefaultPrinter)
 
M

-Michelle-

Thanks Albert for your solution, works perfectly.

Further to that, is there any way to automate the "save dialog" and save the
file created automatically and then close down Adobe?

TIA
Michelle
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top