WORD,Mailmerge and Mutiple print jobs

D

DNimmo

I have an 8 page document merging with 500 names (and other data)

I want each of the letters printed as a separate job so that my
multifunction printer (savin c6045) can staple each letter separately.

this requires (as far I can tell) that each letter print as a separate job

any suggestions are appreciated.
 
P

Peter Jamieson

You are correct that each merge produces a single print job, so you have to
have some way to do one merge per source record.


In the simple case where each of your 8-page documents relates to a single
record in the data source, you can try the following macro, or you may find
the approaches documented at
http://www.gmayor.com/individual_merge_letters.htm more useful.

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

You may also find the follwong useful:
http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm
http://word.mvps.org/FAQs/MailMerge/MergeStraightToPrintrWVBA.htm

Peter Jamieson
 
D

DNimmo

thank you for the quick response
I have tried and am still trying to use the macro from your first link
(@gmayor)
but in my particular instance, the document gets reformatted from 8 pages to
14. this is highly not acceptable. this is what i'm currently researching
(why it's reformatting) i'll look at the other links as well.

THANKS!!
 
D

Doug Robbins - Word MVP

Execute the merge to a new document and then with that new document as the
active document (displayed on the screen), running a macro containing the
following code will send each letter to the printer as a separate document

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


--
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
 
D

DNimmo

thanks!
I'll try this out pronto

Doug Robbins - Word MVP said:
Execute the merge to a new document and then with that new document as the
active document (displayed on the screen), running a macro containing the
following code will send each letter to the printer as a separate document

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


--
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top