Answered by:
Mail Merge - Staple and Collate not working - Word 2010

Question
-
Hi all.
We have a client who is trying to do a mail merge in Word 2010. She needs to print each job as a 3 page document, collated and stapled. We have checked through the printer settings and everything indicates that it should print as expected, however as described in a number of old posts, Word is sending the whole mail merge batch as one job. This means the printer isn't able to determine where one doc finishes and the next starts, so it just staples the whole lot together in one go.
I've looked at a number of old posts around, which indicate a reg hack for Publisher (described at http://support.microsoft.com/kb/891904 - but I dont think it applies to Word 2010).
Elsewhere, I've found an old Macro which should do the trick, but we've seen some odd behaviour. The macro is:
Dim i As Long
With ActiveDocument
For i = 1 To .Sections.Count Step 1
.PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" & i
Next iEnd With
Does anyone know how I can fix this issue in Word 2010. Do I need to alter the Macro at all, or is there a better way to do things in Word now?
Regards,
Nathan
Wednesday, September 19, 2012 11:25 PM
Answers
-
What particular issues do you have with the macro?
See also: http://www.gmayor.com/individual_merge_letters.htm
Cheers
Paul Edstein
[MS MVP - Word]- Marked as answer by Max Meng Tuesday, October 9, 2012 9:32 AM
Thursday, September 20, 2012 5:28 AM
All replies
-
What particular issues do you have with the macro?
See also: http://www.gmayor.com/individual_merge_letters.htm
Cheers
Paul Edstein
[MS MVP - Word]- Marked as answer by Max Meng Tuesday, October 9, 2012 9:32 AM
Thursday, September 20, 2012 5:28 AM -
What particular issues do you have with the macro?
See also:
Cheers
Paul Edstein
[MS MVP - Word]Monday, October 29, 2012 1:35 AM -
There is nothing in the macro code in the link that is capable of doing that. So the problem seems to be with something you're doing.
Cheers
Paul Edstein
[MS MVP - Word]Monday, October 29, 2012 1:50 AM -
I merged a document with two records. So there should be two sections in the merged document. However, when I stepped through the Macro, there are THREE sections. The first two sections seem to match the actual two sections, while the third seems to be the problem. I tried directing the printing to either PDF or MS Document writer but neither generated any output for the last section. But I think when directed to a printer, it would try printing the whole document for the last section, and, if staple option is set, stapling all these pages together. I can tell this was the case when I looked at the job queue of my printer: it showed n individual jobs matching the n sections, AND a HUGE job with n times as many pages as the individual job.
So the solution is:
in the loop, set the end value to be
.Sections.Count - 1
that solved the problem.
p.s. I saw in my merged file, there is a "section break (next page)" in between sections, and a "section break (Continuous)" at the end. Could the continuous section break be the culprit?
I used Word 2010 Enterprise
- Edited by FaNg YiN Monday, October 29, 2012 3:20 AM
Monday, October 29, 2012 3:18 AM -
Indeed, an extra Section break would cause one extra (empty) section to be printed, but that is not the same as saying:
"but then it will print the whole collection of documents again."Cheers
Paul Edstein
[MS MVP - Word]Monday, October 29, 2012 4:29 AM -
I agree the two are different theoretically. But in actuality, I did end up with a stack of useless printed paper from a RICOH Aficio MP 5002 PCL 6.Monday, October 29, 2012 5:34 PM
-
This should rather be used
With ActiveDocument
.MailMerge.DataSource.ActiveRecord = wdFirstRecord
For i = 1 To .MailMerge.DataSource.RecordCount Step 1
.PrintOut Range:=wdPrintAllDocument
.MailMerge.DataSource.ActiveRecord = wdNextRecord
Next i
End With
Wednesday, April 24, 2013 2:36 AM -
With this it prints out correctly once for the mail merge, but then another job is sent to printer and its stapled as one job together, any ideas
Sub PrintStaple()
'
' PrintStaple Macro
'
'
Dim i As Long
With ActiveDocument
For i = 1 To .Sections.Count Step 1
.PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" & i
Next i
End With
End Sub
Wednesday, November 23, 2016 4:19 PM -
The code you posted is incapable of doing as you describe. Evidently, something else is causing the second printout.
Cheers
Paul Edstein
[MS MVP - Word]Wednesday, November 23, 2016 9:28 PM