Change destination printer

G

GFMock

I need to send stickers to a specific printer (several in factory, all same)
based on the workstation requesting. I need to compose the report to "use
specific printer" to get margins etc correct, but having done that the usual
trick of altering the default printer is ignored when I try to send it to the
desired printer. Is there any way to programatically alter the saved
"specifc printer"?
Thanks in advance.
 
G

ghetto_banjo

if you are using Access 2002 or later, there is a property of the
report you can alter:

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


you probably want to look at the default printer first, store that
name and switch back to it when you are done:


dim defPrinter as string

defPrinter = Application.Printer.DeviceName


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

*Run Report, or whatever

Set Application.Printer = Application.Printers(defPrinter)
 
Top