Printing to a Copier

K

Ken

How do you print a mail merge doc to a copier that can
fold,staple,duplex,etc. and not allow word to send it as 1
doc but as multi doc's so the copier can apply these
features????

Thanks,
Ken Smith
(e-mail address removed)
 
P

Peter Jamieson

There's no built-in way to do it unfortunately, so you can either
a. merge to a new document, then use a macro to split the document into
multiple documents and print them.
b. use a macro to do one merge per record in the data source (or per group
of records if you have a more complex merge where each document may be
populated from multiple records)

The advantage of approach (a) is that it does not really matter how many
records in the data source contribute to each output document as long as
there is something that marks the end of each document - in a typical Form
Letter merge, Word will in any case put each output into a new section, so
it is possible to split into sections (as long as you haven't introduced
your own section break(s) in the mail merge main document, in which case you
would have to tweak this macro. If you are doing a Catalog/Directory type
merge, you could try to insert a section break at the end of each
"subdocument".

The disadvantage of this approach is that if you have a large merge, you may
be creating an enormous output file. But you should be able to split the
merge into chunks if that proves to be a problem.


Sub splitandprint()

' You need to test this! You should already have merged to an output
document, which should be the Active document.

Dim i As Integer
Dim intDocumentCount As Integer
Dim oDoc As Document
Dim oPrintDoc As Document
Set oDoc = ActiveDocument
intDocumentCount = oDoc.Sections.Count
For i = 1 To intDocumentCount
oDoc.Sections.First.Range.Cut
Set oPrintDoc = Documents.Add
With oPrintDoc
oPrintDoc.Content.Paste
If oPrintDoc.Sections.Count > 1 Then
.Sections(2).PageSetup.SectionStart = wdSectionContinuous
End If
.PrintOut
.Close Savechanges:=False
End With
Next
Set oPrintDoc = Nothing
Set oDoc = Nothing
End Sub

Approach (b) would be more like this - at least one user has solved similar
problems using this approach.

Sub OneMergePerSourceRec()
'

' NB, needs bettor error management and doubtless other things a VBA expert
' will point out.

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
 

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