Scripted printing for MS Word mail merge (1 Viewer)

phual

Registered User.
Local time
Yesterday, 18:27
Joined
Jun 20, 2009
Messages
27
Hi all

I've got a somewhat specific problem that I'm sure must have an answer, but I'll be blowed if I know how to approach it.

We have a print-and-post-room that is set up with plenty of hardware to make bulk mailing easier (folding machines, envelope-stuffers, etc.). However, we need to print around 1000 20-page, A4 booklets where each one has personalised content. Each booklet is 5 sheets of A3 stapled and folded to make the 20 page A4 booklet. These are personalised by using a mail-merge template.

The problem we have is that whilst the booklet machine can identify the same file being printed 1000 times to produce 1000 separate booklets, a merge of 1000 different records is treated as a single file when sent to print, and would come out as a single book containing all 1000 booklets.

The manual override to this problem is to send each booklet to the printer individually, but this requires someone to sit at the computer saying "print pages 1-20, print pages 21-40... print pages 4001-4020, etc.). My first thought would be a script that automates this, sending 1000 print jobs of 20 pages each. If I were doing it in MS Excel I could probably find my way around this via a macro (though my VBA isn't great), but I don't know where to start for MS Word.

Suggestions?

Stuart
 

gerry@docshop.ie

Registered User.
Local time
Today, 01:27
Joined
Jun 19, 2013
Messages
41
Hi Stuart

I have had this problem before and this is my solution. Setting up the printer to be used to be the default printer and the default Printing Preferences set to produce the booklet.

When you are in a mail merge document, it is possible to preview the results and you can also view the result of any available record and best of all this can be printed.

I then setup a small macro to sequentially cycle trough each record in the preview and then print that document (once I figured this out I never actually did a mail merge from the document)

Before letting your macro loose, once the printer defaults are set correctly, do a [Ctrl] + [p] and press [Enter] do not manually change any print settings, this is the manual version of getting the code to print, if you get a booklet then let the code run.

Hope this helps

Gerry
 

gerry@docshop.ie

Registered User.
Local time
Today, 01:27
Joined
Jun 19, 2013
Messages
41
Just found the code I used

Code:
 Sub PrintMailMergePreviewRecord()
Dim MyLoop As Integer
If ActiveDocument.MailMerge.ViewMailMergeFieldCodes = -1 Then
ActiveDocument.MailMerge.ViewMailMergeFieldCodes = wdToggle
End If
For MyLoop = 1 To ActiveDocument.MailMerge.DataSource.RecordCount

Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentWithMarkup, Copies:=1, Pages:="", PageType:= _
wdPrintAllPages, Collate:=True, Background:=True, PrintToFile:=False, _
PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
ActiveDocument.MailMerge.DataSource.ActiveRecord = wdNextRecord
Next
End Sub [\code]
  
  
 Gerry
 

phual

Registered User.
Local time
Yesterday, 18:27
Joined
Jun 20, 2009
Messages
27
I'll give that whirl and see where it takes me.

Thanks

Stuart
 

Users who are viewing this thread

Top Bottom