Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Mailmerge printing different paper tray multiple sections per print job
Doug was VERY helpful and provided me with a macro that would run from the
merged document and print each record as a separate job. The problem I ran into was that the template itself actually contains 3 sections per record. So the macro; Dim i As Long For i = 1 To ActiveDocument.Sections.Count ActiveDocument.PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" & i Next i Functions properly however, I beleive it's treating each section as a separate print job. I need to somehow get it to print after every 3rd section or determine another way of splitting up the jobs. Any help would be greatly appreciated! -- Message posted via http://www.officekb.com |
#2
|
|||
|
|||
As an interim suggestion, how about adjusting the range of sections, e.g.
Dim i As Long For i = 1 To ActiveDocument.Sections.Count Step 3 ActiveDocument.PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" & trim(cstr(i+2)) Next i Peter Jamieson "craig friend via OfficeKB.com" wrote in message ... Doug was VERY helpful and provided me with a macro that would run from the merged document and print each record as a separate job. The problem I ran into was that the template itself actually contains 3 sections per record. So the macro; Dim i As Long For i = 1 To ActiveDocument.Sections.Count ActiveDocument.PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" & i Next i Functions properly however, I beleive it's treating each section as a separate print job. I need to somehow get it to print after every 3rd section or determine another way of splitting up the jobs. Any help would be greatly appreciated! -- Message posted via http://www.officekb.com |
#3
|
|||
|
|||
Thanks for the suggestion...I'll have to try that one.
I actually added two other variables Dim i As Long Dim k As Long Dim j As Long k=1 j=3 For i = 1 To ActiveDocument.Sections.Count ActiveDocument.PrintOut Range:=wdPrintFromTo, From:="s" & k, To:="s" & j k=k+3 j=j+3 Next i -- Message posted via http://www.officekb.com |
#4
|
|||
|
|||
Correction:
Dim i As Long Dim k As Long Dim j As Long k=1 j=3 For i = 1 To ActiveDocument.Sections.Count/3 ActiveDocument.PrintOut Range:=wdPrintFromTo, From:="s" & k, To:="s" & j k=k+3 j=j+3 Next i -- Message posted via http://www.officekb.com |
#5
|
|||
|
|||
If it works, it works. but just out of interest, why not use the "Step"
keyword in the For statement? as I suggested? It just seems a bit more straightforward to me. Peter Jamieson "craig friend via OfficeKB.com" wrote in message ... Correction: Dim i As Long Dim k As Long Dim j As Long k=1 j=3 For i = 1 To ActiveDocument.Sections.Count/3 ActiveDocument.PrintOut Range:=wdPrintFromTo, From:="s" & k, To:="s" & j k=k+3 j=j+3 Next i -- Message posted via http://www.officekb.com |
#6
|
|||
|
|||
Peter...thanks again!
It did work...but the your's is much cleaner. I just wasn't aware of Step keyword. Thanks again for all your help! -- Message posted via http://www.officekb.com |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I change paper tray options on the fly--without making it . | Microsoft Word Help | |||
Printing multiple pages on a sheet of paper | Page Layout | |||
help on ms word printing paper resize (destination paper) | New Users | |||
Multiple copies & Landscape problems when printing in Word | Microsoft Word Help | |||
Printing multiple pages in 1 problem | Microsoft Word Help |