Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2007

Tip: Looking for answers? Try searching our database.

select printer paper tray in Word using macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Rowell - 20 Apr 2007 21:42 GMT
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 - 20 Apr 2007 23:23 GMT
>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
[quoted text clipped - 9 lines]
> What am I missing here; why are tray select keystrokes not captured in
> macro,

I don't know that

> how do I specify paper trays?

By specifying the FirstPageTray and OtherPagesTray properties of the
document to be printed.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

David Rowell - 21 Apr 2007 15:32 GMT
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

snip

> By specifying the FirstPageTray and OtherPagesTray properties of the
> document to be printed.
Jonathan West - 21 Apr 2007 18:05 GMT
>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.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

David Rowell - 21 Apr 2007 21:58 GMT
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

> >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
[quoted text clipped - 6 lines]
> your upper tray, print a copy, then specify both to be the lower tray, and
> print another copy.
David Rowell - 21 Apr 2007 22:30 GMT
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

snip

> If I can simply add that code to the macro, can you tell me where, what
> formatting applies, etc.?
[quoted text clipped - 11 lines]
> > your upper tray, print a copy, then specify both to be the lower tray, and
> > print another copy.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.