Mail Merge print VBA

A

Andy Newland

Hi,

I have a print macro that prints documents to different
trays on our work printer. i.e. Headed Paper, Billing
paper etc.

This is done simply by setting the

ActiveDocument.PageSetup.FirstPageTray

property. When the document is a mail merge the intial
FirstPageTray tray value is 9999999 and attempting to
reset the value gives a 'Value out of range' error.

Can anyone explain this?

Thanks

Andy Newland
 
J

Jonathan West

Hi Andy,

Different printer have different values for their diffirent input trays, and
just about none of them use the values given by the Word constants.

I've written a series of articles on printer control in Word. The first of
these goes into the issue of paper trays in quite a lot of detail. I think
it might help you.

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
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
 
T

Thorkild Kronborg

Hi Jonathan
I got the same problem.
I have a large mail merge document (about 800 pages) and
get an error trying to alter the value of FirstPageTray
in my VBA macro, but when I cut the document in smaller
parts (200 pages) my macro doesn't fail. So it's not
because I use an improper value, but a problem with Word
I guess.
With the large document the FirstPageTray property has an
initial value of 9999999, with the small one the value is
2.
Also if I manually select the paper tray with the headed
paper there is a difference between the large document
and the small one. For the large document the first page
off each section doesn't print on the headed paper. For
the smaller document it does.
Do you know anything new about this problem? Have you
made some code that can set the printer bin - not using
Word's FirstPageTray?


Thanks

Thorkild Kronborg
email: (e-mail address removed)
 

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