Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Frank P Florida Frank P Florida is offline
external usenet poster
 
Posts: 2
Default Merge file printing problem

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.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Merge file printing problem

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/...PrintrWVBA.htm

Peter Jamieson



"Frank P Florida" wrote in message
...
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.


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Frank P Florida Frank P Florida is offline
external usenet poster
 
Posts: 2
Default Merge file printing problem

Thank you very much.

"Peter Jamieson" wrote:

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/...PrintrWVBA.htm

Peter Jamieson



"Frank P Florida" wrote in message
...
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.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge Printing Problem anthonym Mailmerge 1 July 22nd 07 08:17 AM
Problem with Embedded File Icons not Printing Mkate Microsoft Word Help 4 July 16th 07 12:30 AM
Mail Merge problem with File Conversion Joergen Bondesen Mailmerge 1 May 21st 06 01:20 PM
Problem Printing Specific Pages After Merge Jim Mac Millan Mailmerge 5 April 14th 06 10:29 PM
Problem printing two-page mail merge document Edward Lee Page Layout 4 April 14th 05 12:40 AM


All times are GMT +1. The time now is 05:40 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"