Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default printer options

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default printer options

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.

--
John Green
Sydney
Australia


"kari" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default printer options

thanks a bunch!
kari

"John Green" wrote:

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.

--
John Green
Sydney
Australia


"kari" wrote in message
...
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
tools options view window options Joe[_14_] Excel Discussion (Misc queries) 1 November 11th 09 04:08 PM
members on my network printer not able to print to default printer smeheut Excel Discussion (Misc queries) 0 June 18th 07 06:42 PM
Printer Multiple Worksheets with a particular Printer Setting PP[_2_] Excel Worksheet Functions 0 March 14th 07 02:02 PM
Printer Options jujuwillis Excel Discussion (Misc queries) 1 August 28th 06 03:21 AM
how do I add more toolbar options to my right click options Rosie Excel Discussion (Misc queries) 1 August 11th 06 04:52 PM


All times are GMT +1. The time now is 03:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"