Printing worksheet with printer tray # 3

S

SHA

Hi,

I have laser printer with 3 trays, two for letter size paper (tray # 1 and # 2) and one for legal size paper (tray # 3). I have as the default tray # 1, but I want to develop a macro to print in tray # 3 every time I press <Ctrl-I>. As far as I know I can use the "ActiveSheet.PrintOut" command to print the active sheet, but I do not know how to specify tray # 3, Can you help me?

Thanks,
Salvador Hernandez
 
D

David C.

do it manually while recording a new macro

then take a look in the code generated

then you see wich argument is used for changing the tray name (if possible)
 
K

keepITcool

I have an addin to do it... it works for me in winXP environment,
but i cannot test it in a network situation. Lots will depend on
permissions... .

it even allows printing page 1 in tray 3 rest in tray 1
(see download page on my site. save your work before trying it the
first time.)

However the accepted approach here is to simply create an extra printer
in windows control panel, and set that up to print from the tray you
want.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


SHA wrote :
 
K

keepITcool

David.

???and you TRIED this?
since you cannot set the Printer Tray within Excel.
the recorder will record nothing.

...imo a useless answer.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


David C. wrote :
 
D

David C.

as you said: keep Kool ! sometimes it is ok this way...

if it doesn't then you'll need to take a look on this: (i used it, it
works)

Don't be afraid, everything is written and you can download the macros at
the end of the last pages...
and it's easy to use it; but it takes so long to explain how it works...


Controlling the Printer from Word VBA
by Jonathan West

Part 1: Using VBA to Select the Paper Tray
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=101

Part 2: Using VBA to control Duplex, Color Mode and Print Quality
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=116

Part 3: Dealing with Different Paper Sizes
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=132

Part 4: Getting printer driver details
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=183
 
K

keepITcool

yep I'll keep cool.. but

the articles are all WORD related.
this is en EXCEL ng.. and in EXCEL it's NOT possible.
like described in the articles.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


David C. wrote :
 
K

keepITcool

keepITcool wrote :
yep I'll keep cool.. but

the articles are all WORD related.
this is en EXCEL ng.. and in EXCEL it's NOT possible.
like described in the articles.

David

ouch..
please disregard the above.
my humble apologies...

indeed I need to think back as to WHY I choose my nick...
 
D

David C.

this idea is great, but the macro (given in the articles) are quite
efficient, and in some cases it's a better way... (it works also on other
computers, with other printers, etc...)
 
D

David C.

CallByName ctlWizard, "Mask", VbLet, ctlReset.Picture
gives a compilation error on my excel...

I think it looks like a hard work, but I can not test it. Someone else will
do it maybe...

In my work, when i need to translate a function usually it's from my own
language to english (for keeping a proper code, runing 'everywhere'). And
this, Excel can do it (write FormulaLocal, re-read Formula, or the opposite
way;.... done !)... But the pack is great idea.

the other packs looks good...
but I did not really take all the time to test it

still keep it cool !
 

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