View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default Mailmerge and Stapling

I don't know which particular macro you used - perhaps the one in the
following article which someone else used successfully a couple of years
ago - if not, perhaps it would be worth giving this one a try - but
a. I agree with Doug
b. there are a couple of other ideas in here, but personally I'd stick with
the thing that /does/ work rather than pursuing things which probably won't

This question pops up from time to time and unfortunately
a. I don't have access to this type of printer so can't test
b. no-one has ever told me whether any of the approaches I've suggested
actually work.

The main suggestions a
a. have a good look at the printer driver options, and see if there is any
way you can trigger the stapling action by, e.g. specifying that page or
perhaps the last page comes from a different bin. I doubt it, but worth
looking.
b. if you have a detailed technical manual for the printer that tells you
what sequence to send to trigger the stapling action, you may be able to put
that sequence into a { PRINT } field at the beginning or end of your
document. Again, PRINT only works in certain circumstances so it's a long
shot. You might also be able to work out what control sequence or postscript
code is used to trigger stapling by checking the "print to file" option in
File|Print and comparing the output of "stapled" and "non-stapled" documents
in e.g. Notepad. Also a long shot. You may find with Word XP you can issue
the corrct sequence in some way using Word Mailmerge events.
c. Instead of doing one merge for all the records in your data source, use
VBA to do one merge for each record in your data source. You should then see
one print job per packet rather than a 1500 page print job. Some starting
point code is as follows - you may find see the Print dialog for each merge,
depending on the version of Word. If your merge processes multiple source
data records per packet you will obviously need to modify the source code.

If /any/ of these approaches works it would be useful if you could tell us
what worked, and in the case of (a) or (b), which version of Windows and
Word you are using and what the printer is.

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

--
Peter Jamieson

wrote in message
ups.com...
This topic has been addressed many times I'm sure, but I'm wondering if
there is a better solution. Right now, I have a mailmerge document
that pulls data from a spreadsheet. I want these pages to be stapled
together so I don't have to do the stapling. I found a macro that
sends each section to the printer as it's own print job, but this is
not working like I would like. It's making my computer useless during
the print and takes a very long to print.

Anyone have any way to staple sections together in a mailmerge
document? I'm guess there's problem no other way to do this without
sending as seperate jobs, but I would LOVE for there to be some way of
doing this.

Thanks in advance for the help!

Stephen Mizell