VBA printing to tray one won't work

Hi
When I try to print to a tray 1 on a printer it always redirects to Auto
When I use .Printer.PaperBin = 1 it goes to tray Auto
When I use .Printer.PaperBin = 2 it goes to tray 3
When I use .Printer.PaperBin = 3 it goes to tray 2
When I use .Printer.PaperBin = 4 it goes to tray Multifunction
When I use .Printer.PaperBin = 5 it goes to tray Auto
When I use .Printer.PaperBin = 6 it goes to tray Auto

How do I print to tray 4 and tray 1?

I've even tried to create 3 printqueues and then print to the queue, but the outputtray overrules that?

I'm printing on Kyocera Mita TA3051ci (4trays) and Kyocera ECOSYS F34300 (3 trays, there I don't need to print to tray 4 ;-) )
LVL 2
Filip HeensAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
The PaperBin property takes an argument of type acPrintPaperBin. Those values don't necessarily correspond to the bins you believe they do. For example, 1 is the "upper bin", 2 is the "lower bin", and 3 is the "middle bin". 4 is "manual insertion", 5 and 6 are for envelope feeds, and 7 is the default bin. See here for more information on that:

https://msdn.microsoft.com/EN-US/library/office/ff822005.aspx

You would very likely have to play around with the various acPrintPaperBin values to determine exactly which ones to use. In many cases, you would store those settings in a user table somewhere, and then pull them out when you need to print to a specific printer and/or bin.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Filip HeensAuthor Commented:
ok that one I found (and now I see the numbers in the middle column... ;-)
But I don't see any paper bin 4 or 1 :( ;-)

I did however find this Experts Exchange article and I'm trying to get this to work ;-)
Once I've got that I can see what codes are used for the other tray's ;-)
http://www.experts-exchange.com/Database/MS_Access/Q_21902049.html

I'll get back to you when I have more info
Thanks for the help
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
That link essentially says the same thing I'm saying - you'll have to play with the various acPrintPaperBin values to find the right one. There is simply no way they could define "Tray1", since many printers consider "Tray1" to be the upper tray, while others consider that to be the lower tray. There is little (if any) standardization between printers and their drivers, so you're very much at the mercy of "try and see" when doing anything like this.
Filip HeensAuthor Commented:
Even though I already knew that link, I give an A grade...
It didn't help me, but that is because of the windows/vba and not the answer...
There is absolutely no way to print to tray 4 or higher (I've tested all 254 possible key's).
I guess I just have to live with it...
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Access is not the best environment when you're trying to automate peripherals, and especially when you're dealing with high-end stuff (like printers with 4 trays). Generally speaking, when you must interact with those sorts of peripherals, you're better off using a more robust environment, like .NET, or perhaps and SDK that interfaces with the printer.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.