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.

Merge file printing problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Frank P Florida - 14 Aug 2007 16:36 GMT
I have a 7 mb. word document(many graphics) that I am trying to personalize
by using a mail merge.  I am prinint 135 unique documents by doing a mail
merge with excel.  I am only merging in 2 small fields but it takes a
tremendously long time to do this job.  When I started the merge the first
30-40 documents were created quickly then it slowed to a crawl and took a
couple of hours to finish the other 100.  It appears it must be some kind of
memopry issue or something.  Is there some way to set this up so that I don't
get bogged down beacuse my document is so large?

Thanks for any ideas.
Peter Jamieson - 14 Aug 2007 16:54 GMT
When Word does a Mail Merge to printer, all the output is in a single Print
Job. 7Mb x 135 is approaching 1Gb which is quite a lot of /extra/ RAM even
by today's standards, and there is probably loads of extra overhead for
reasons I don't even want to think about!

One thing you can try in the simple case is to use VBA to do one merge per
record in the data source using a macro such as the following:

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 a 7 mb. word document(many graphics) that I am trying to personalize
> by using a mail merge.  I am prinint 135 unique documents by doing a mail
[quoted text clipped - 8 lines]
>
> Thanks for any ideas.
Frank P Florida - 14 Aug 2007 18:16 GMT
Thank you very much.

> When Word does a Mail Merge to printer, all the output is in a single Print
> Job. 7Mb x 135 is approaching 1Gb which is quite a lot of /extra/ RAM even
[quoted text clipped - 66 lines]
> >
> > Thanks for any ideas.
 
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.