printer options

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

our business just purchased a new HP 4200 LaserJet printer with four paper
trays. We print documents which require three or four different colors of
paper (page 1 red, page 2 green, etc.). I am trying to set up vb code that
will select the correct trays for our empolyees automatically. Since the
print menu which allows you to do this is an hp screen, not an excel one, i
can't seem to access these options through excel vb. there doesn't seem to
be an object library i can use in references. any ideas?

kari
 
Kari,

Theoretically, you can use SendKeys to specify the printer settings.
However, in my experience the results are messy and unreliable.

What you can do is set up a number of different print queues that point to
the same printer. These appear as if they are different printers and can be
easily specified using Application.ActivePrinter in your code. This gives
you the opportunity to set up different printing preferences for each
"virtual" printer and switch between them.

Another way I use to change printer settings is to write the output to a
file using a standard set of printing preferences and then edit the headers
in the file using VBA before sending the file to a print queue. This
requires a lot of specialist knowledge of printer codes or a lot of
investigative work, so might not be practical for most developers.
 
thanks a bunch!
kari

John Green said:
Kari,

Theoretically, you can use SendKeys to specify the printer settings.
However, in my experience the results are messy and unreliable.

What you can do is set up a number of different print queues that point to
the same printer. These appear as if they are different printers and can be
easily specified using Application.ActivePrinter in your code. This gives
you the opportunity to set up different printing preferences for each
"virtual" printer and switch between them.

Another way I use to change printer settings is to write the output to a
file using a standard set of printing preferences and then edit the headers
in the file using VBA before sending the file to a print queue. This
requires a lot of specialist knowledge of printer codes or a lot of
investigative work, so might not be practical for most developers.
 

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

Back
Top