Select Printer Tray In Different Spots Within a Document

J

John C Brainard

I have a billing file that i have a problem with. This particluar customer
wants the first page of the bills printed on a form, which will be in 1 tray,
and the remaining pages printed on white paper, which will be in tray 2. The
document comes to me in a text spool file, i can get it into Word, but do not
know how to change in to different trays within Word. I know that if i were
printing a booklet or something that i can select to have the first page
print out of 1 tray, and the others out of another tray.

Each file that i get contains 5000 bills. 1 bill could be 3 pages, the next
one could be 18 pages.

I will be duplex printing these pages.
 
S

Suzanne S. Barnhill

If you set up the document to use a specific tray for the first page and a
different tray for the rest and then insert Next Page section breaks between
bills, you'll get the effect you want (since the tray settings will be used
for each section. What you'll need to do is figure out how to insert the
section breaks automatically. If you can identify specific text that always
occurs at the beginning of a bill, you can use Find and Replace to do your
dirty work:

1. Insert a Next Page section break, select it, and Copy.

2. In the "Find what" box of the Replace dialog, type the text that begins
each bill.

3. In the "Replace with" box, type ^c^&. ^c inserts the contents of the
Clipboard; ^& inserts the "Find What Text," that is, what you were searching
for. The result will be your section break inserted before the text.
 
J

John C Brainard

I haven't been able to get it totally working. Here is the code i am using.
I can't seem to get the section break to work before i replace the data. the
line wiht the astrixes is the line giving me trouble

With Selection.Find
.Text = "
________________________________________________________________________________________________" & "^l" & " APR 1 - 2005 "
******* .Replacement.Text = Selection.InsertBreak & "^&"
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Find.Execute Replace:=wdReplaceAl
 
S

Suzanne S. Barnhill

For help with a macro solution, try posting in one of the word.vba NGs.



John C Brainard said:
I haven't been able to get it totally working. Here is the code i am using.
I can't seem to get the section break to work before i replace the data. the
line wiht the astrixes is the line giving me trouble

With Selection.Find
.Text = "
____________________________________________________________________________
____________________" & "^l" & " APR 1 - 2005 "
 
Top