Selecting the Printer for a Report in a .mde file

M

Marco

Is there any way to automate the process of selecting a
specific printer for a report in a .mde file, (no in
a .mdb).

Thanks
 
A

Albert D. Kallal

You don't mention what version of ms-access.

Prior to a2002, you had to use some code. (I have some sample code that will
do this for you).

Note that access XP does have built in the ability to switch printers. So,
while my code *should* work, you do NOT need it in a2002.

You can use:

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


The above means you don't need my code.

So, to save/switch, you can use:

dim strDefaultPrinter as string

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

' swtich to printer of your choice:

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

do whatever.

Swtich back.

Set Application.Printer = Application.Printers(strDefaultPrinter)

If you want some code for prior to a2002, grab my example that works with
mde files at:

http://www.attcanada.net/~kallal.msn/msaccess/msaccess.html
 

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