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 / July 2006

Tip: Looking for answers? Try searching our database.

Splitting Merge to a printer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tony - 12 Jul 2006 05:12 GMT
Hi there,
I am wanting to do a mail merge direct to the copier and have each record
split into 'sections' so I can utilise the printer's finishing features.
I have a 4 page merge which I want double sided and stapled. Only problem is
that when you have 400 records you end up with a 1600 page document which you
have to hand staple. I want to treat each record as its own document and
apply finishing features to each record and end up with 400 stapled sets. I
think maybe a macro will do this but I can't seem to find such a thing to
actually work. Word version is 2002 SP3 (or 2003 SP1 on another machine).
Anybody who can help will be greatfully appreciated!!

Thankyou heaps
Peter Jamieson - 12 Jul 2006 08:39 GMT
You can try the following VBA, but if you are trying to do anything like
"get the paper for different parts of each document from different paper
bins" then something more is likely to be needed:

Sub PrintOneDocPerSourceRec()
Dim intSourceRecord
Dim objMerge As Word.MailMerge
'Dim strOutputDocumentName As String
Dim TerminateMerge As Boolean

' Need to set up this object as the ActiveDocument changes when the
' merge is performed. Besides, it's clearer.

Set objMerge = ActiveDocument.MailMerge
With objMerge

 ' If no data source has been defined, do it here using OpenDataSource.
 ' But if it is already defined in the document, you should not need
 ' to define it here.

 ' .OpenDataSource _
 ' Name:="whatever"

 intSourceRecord = 1
 TerminateMerge = False

 Do Until TerminateMerge
   .DataSource.ActiveRecord = intSourceRecord

   ' if we have gone past the end (and possibly, if there are no records)
   ' then the Activerecord will not be what we have just tried to set it to

   If .DataSource.ActiveRecord <> intSourceRecord Then
     TerminateMerge = True
   ' the record exists
   Else

     .DataSource.FirstRecord = intSourceRecord
     .DataSource.LastRecord = intSourceRecord
     .Destination = wdSendToPrinter
     .Execute

     intSourceRecord = intSourceRecord + 1
   End If
 Loop
End With
End Sub

If you haven't used Word VBA Macros before, see

http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm

As for "applying finishing features to each document," the above macro
obviously assumes that everything you need can be set in the printer driver
and is the same for each document.

Peter Jamieson

> Hi there,
> I am wanting to do a mail merge direct to the copier and have each record
[quoted text clipped - 11 lines]
>
> Thankyou heaps
Doug Robbins - Word MVP - 12 Jul 2006 14:55 GMT
Execute the merge to a new document and then run a macro containing the
following commands when that document is the Active Document.  Each letter
will then be sent to the printer as a separate print job:

Dim i As Long
With ActiveDocument
   For i = 1 To .Sections.Count
       .PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" & i
   Next i
End With

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Hi there,
> I am wanting to do a mail merge direct to the copier and have each record
[quoted text clipped - 11 lines]
>
> Thankyou heaps
 
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.