Automating the Paper Type?

R

Raymond M. Nagel

Hi. I am trying to use a MS Word 2003 object in VB2005 to print certain
documents on letterhead paper. The printer (a networked HP LaserJet 5000n)
contains the letterhead paper in the bin that says '2' on the front. The
printer is configured to use bin 2 for letterheads automatically. I cannot
open Word manually and go to File->Print->Properties->Paper|Paper/Quality->
and set "Source is:" to Tray 1 (which is bin 2) because it is greyed-out, but
I can set "Type is:" to "Letterhead": it will print out just fine on the
correct paper from bin 2.

-BUT-

I cannot change the "Type is:" field in my application; the Word objects
don't seem to contain any reference to it. I have tried changing the
ActiveDocument.PageSetup.First|OtherPageTray properties to every member of
the WdPaperTray enum, but this doesn't seem to have any effect.

I have also tried recording a macro of me manually setting
File->Print->Properties->Paper|Paper/Quality->Is Type: = "Letterhead", but
when I looked at the macro contents in VBA, there was only a PrintOut
statement that did not appear to contain any information about setting a
Letterhead type.
Please help!
Thank you!
 
R

Raymond M. Nagel

Thank you Jonathan. Your article was very good, and I think it *almost*
solved my problem.
I wrote a little program (with your code) to enumerate the printer bins.
First I tried it on one printer. Great: it gave me like 19 bin numbers to
use. However, then I tried it on the printer I need it for, and it gave me 1
entry: "15 - Form Select". Something must be screwed up with the way my
printer is set up. If you have any additional ideas on this, please reply.
Thanks for all your help.
-RN
 

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