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 / August 2007

Tip: Looking for answers? Try searching our database.

WORD,Mailmerge and Mutiple print jobs

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DNimmo - 02 Aug 2007 16:54 GMT
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.
Peter Jamieson - 02 Aug 2007 17:18 GMT
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

>I have an 8 page document merging with 500 names (and other data)
>
[quoted text clipped - 4 lines]
>
> any suggestions are appreciated.
DNimmo - 02 Aug 2007 17:32 GMT
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!!

> 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.
[quoted text clipped - 62 lines]
> >
> > any suggestions are appreciated.
Doug Robbins - Word MVP - 02 Aug 2007 20:54 GMT
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

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

> thank you for the quick response
> I have tried and am still trying to use the macro from your first link
[quoted text clipped - 78 lines]
>> >
>> > any suggestions are appreciated.
DNimmo - 03 Aug 2007 02:44 GMT
thanks!
I'll try this out pronto

> 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
[quoted text clipped - 89 lines]
> >> >
> >> > any suggestions are appreciated.
 
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.