Automate selecting Trays?

  • Thread starter Guus van Waardenburg
  • Start date
G

Guus van Waardenburg

Hi all,

I've made a program on wich people can create letters. The problem is that
the printer is not listening to my commands in terms of selecting the right
Papertray, this is my code:

Sub TraySelect()
With ActiveDocument.PageSetup
.FirstPageTray = 260
.OtherPagesTray = 259
End With
End Sub

Does anyone know what I'm doing wrong here? The program only uses the
OtherPagesTray...

Thanks in advance!
 
J

Jonathan West

Guus van Waardenburg said:
Hi all,

I've made a program on wich people can create letters. The problem is that
the printer is not listening to my commands in terms of selecting the
right
Papertray, this is my code:

Sub TraySelect()
With ActiveDocument.PageSetup
.FirstPageTray = 260
.OtherPagesTray = 259
End With
End Sub

Does anyone know what I'm doing wrong here? The program only uses the
OtherPagesTray...

Thanks in advance!


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



--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
G

Guus van Waardenburg

Thanks for the quick reply.

Unforunately enough it isn't the answer which I'm looking for. I know the
BinNumbers, as seen in my code. But the printer still won't listen.

For the record, I have tried the procedure that you've handed to me but it's
quite te same...

But still no other papers.
 
J

Jonathan West

Guus van Waardenburg said:
Thanks for the quick reply.

Unforunately enough it isn't the answer which I'm looking for. I know the
BinNumbers, as seen in my code. But the printer still won't listen.

Bin numbers change from printer to printer and don't match the values of the
predefined constants in Word. Are you sure you have the right numbers?
For the record, I have tried the procedure that you've handed to me but
it's
quite te same...

Have you tried swapping the numbers round for the FirstPageTray and
OtherPagesTray properties? This might help see if the problem is that the
printer is ignoring the FirstPageTray property or is ignoring commands to
use tray ID 260.

It is necessary when you hit this kind of problem to root around a bit to
see if you can find the cause. here are a few other questions which might
reveal useful information.

What printer are you using?
Is it networked?
Have you spoken to your IT people about whether you have sufficient
permissions to set the tray?
Has the correct printer driver been used for that particular make & model of
printer?
Are you using the latest available version of the driver?

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

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