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 / Mailmerge and Fax / June 2005

Tip: Looking for answers? Try searching our database.

Mailmerge printing different paper tray multiple sections per print job

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
craig friend - 17 Jun 2005 18:54 GMT
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!
Peter Jamieson - 17 Jun 2005 19:59 GMT
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
> 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
[quoted text clipped - 13 lines]
>
> Any help would be greatly appreciated!
craig friend - 18 Jun 2005 01:00 GMT
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
craig friend - 18 Jun 2005 01:03 GMT
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
Peter Jamieson - 18 Jun 2005 09:28 GMT
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
> Correction:
>
[quoted text clipped - 11 lines]
>
> Next i
craig friend - 20 Jun 2005 12:42 GMT
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!
 
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.