Discussion:
select printer paper tray in Word using macro
(too old to reply)
David Rowell
2007-04-20 20:42:01 UTC
Permalink
I created a macro in Word 2003 that would (1) print 1 copy of current doc
from upper paper tray (yellow paper, for file copy) w/ hidden text, and (2)
print 1 copy of current doc from lower paper tray (bond paper, for mailing)
w/o hidden text. I tried to record same macro in Word 2007, but macro doesn't
seem to capture tray selection keystrokes, so both copies come from currently
selected paper tray.

What am I missing here; why are tray select keystrokes not captured in
macro, how do I specify paper trays?

thanks in advance---David
Jonathan West
2007-04-20 22:23:53 UTC
Permalink
Post by David Rowell
I created a macro in Word 2003 that would (1) print 1 copy of current doc
from upper paper tray (yellow paper, for file copy) w/ hidden text, and (2)
print 1 copy of current doc from lower paper tray (bond paper, for mailing)
w/o hidden text. I tried to record same macro in Word 2007, but macro doesn't
seem to capture tray selection keystrokes, so both copies come from currently
selected paper tray.
What am I missing here; why are tray select keystrokes not captured in
macro,
I don't know that
Post by David Rowell
how do I specify paper trays?
By specifying the FirstPageTray and OtherPagesTray properties of the
document to be printed.
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
David Rowell
2007-04-21 14:32:03 UTC
Permalink
I was probably unclear; I want to print two copies of the doc, 1 copy from
upper paper tray, second copy from lower paper tray; I do not need to change
trays between first page and subsequent pages, rather, change trays between
copy 1 and copy 2;

thanks again

David

"Jonathan West" wrote:

snip
Post by Jonathan West
By specifying the FirstPageTray and OtherPagesTray properties of the
document to be printed.
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Jonathan West
2007-04-21 17:05:55 UTC
Permalink
Post by David Rowell
I was probably unclear; I want to print two copies of the doc, 1 copy from
upper paper tray, second copy from lower paper tray; I do not need to change
trays between first page and subsequent pages, rather, change trays between
copy 1 and copy 2;
In that case, you specify both the FirstPageTray and OtherPagesTray to be
your upper tray, print a copy, then specify both to be the lower tray, and
print another copy.
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
David Rowell
2007-04-21 20:58:01 UTC
Permalink
That makes sense, and I probably should have seen that. It leads to another
question though; can I simply add those bits of code to the existing macro
code? I created the macro, by the way, using the recorder; i.e.,
"file|print|properties|upper paper tray|OK|options|print hidden text|OK|OK"
for first copy, etc. for 2d copy.

I won't copy macro here, you probably know what it looks like, but in Visual
Basic it begins "Sub Print2 ()", and so on (I called it "Print2" because,
well, you know;

If I can simply add that code to the macro, can you tell me where, what
formatting applies, etc.?

TIA---David
Post by Jonathan West
Post by David Rowell
I was probably unclear; I want to print two copies of the doc, 1 copy from
upper paper tray, second copy from lower paper tray; I do not need to change
trays between first page and subsequent pages, rather, change trays between
copy 1 and copy 2;
In that case, you specify both the FirstPageTray and OtherPagesTray to be
your upper tray, print a copy, then specify both to be the lower tray, and
print another copy.
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
David Rowell
2007-04-21 21:30:01 UTC
Permalink
After asking how, I went to
http://word.mvps.org/FAQs/MacrosVBA/SetPaperTray.htm and copied the code
there, pasted code into my macro and ran it, works great.

Thanks to all---David

"David Rowell" wrote:

snip
Post by David Rowell
If I can simply add that code to the macro, can you tell me where, what
formatting applies, etc.?
TIA---David
Post by Jonathan West
Post by David Rowell
I was probably unclear; I want to print two copies of the doc, 1 copy from
upper paper tray, second copy from lower paper tray; I do not need to change
trays between first page and subsequent pages, rather, change trays between
copy 1 and copy 2;
In that case, you specify both the FirstPageTray and OtherPagesTray to be
your upper tray, print a copy, then specify both to be the lower tray, and
print another copy.
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Continue reading on narkive:
Search results for 'select printer paper tray in Word using macro' (Questions and Answers)
4
replies
Where can i find tips and tricks for MS Word?
started 2006-06-25 03:49:19 UTC
software
Loading...