Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
I have an 8 page document merging with 500 names (and other data)
I want each of the letters printed as a separate job so that my multifunction printer (savin c6045) can staple each letter separately. this requires (as far I can tell) that each letter print as a separate job any suggestions are appreciated. |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
You are correct that each merge produces a single print job, so you have to
have some way to do one merge per source record. In the simple case where each of your 8-page documents relates to a single record in the data source, you can try the following macro, or you may find the approaches documented at http://www.gmayor.com/individual_merge_letters.htm more useful. 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 "DNimmo" wrote in message ... I have an 8 page document merging with 500 names (and other data) I want each of the letters printed as a separate job so that my multifunction printer (savin c6045) can staple each letter separately. this requires (as far I can tell) that each letter print as a separate job any suggestions are appreciated. |
#3
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
thank you for the quick response
I have tried and am still trying to use the macro from your first link (@gmayor) but in my particular instance, the document gets reformatted from 8 pages to 14. this is highly not acceptable. this is what i'm currently researching (why it's reformatting) i'll look at the other links as well. THANKS!! "Peter Jamieson" wrote: You are correct that each merge produces a single print job, so you have to have some way to do one merge per source record. In the simple case where each of your 8-page documents relates to a single record in the data source, you can try the following macro, or you may find the approaches documented at http://www.gmayor.com/individual_merge_letters.htm more useful. 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 "DNimmo" wrote in message ... I have an 8 page document merging with 500 names (and other data) I want each of the letters printed as a separate job so that my multifunction printer (savin c6045) can staple each letter separately. this requires (as far I can tell) that each letter print as a separate job any suggestions are appreciated. |
#4
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Execute the merge to a new document and then with that new document as the
active document (displayed on the screen), running a macro containing the following code will send each letter to the printer as a separate document Dim i As Long With ActiveDocument For i = 1 To .Sections.Count .PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" & i Next i End With -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "DNimmo" wrote in message ... thank you for the quick response I have tried and am still trying to use the macro from your first link (@gmayor) but in my particular instance, the document gets reformatted from 8 pages to 14. this is highly not acceptable. this is what i'm currently researching (why it's reformatting) i'll look at the other links as well. THANKS!! "Peter Jamieson" wrote: You are correct that each merge produces a single print job, so you have to have some way to do one merge per source record. In the simple case where each of your 8-page documents relates to a single record in the data source, you can try the following macro, or you may find the approaches documented at http://www.gmayor.com/individual_merge_letters.htm more useful. 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 "DNimmo" wrote in message ... I have an 8 page document merging with 500 names (and other data) I want each of the letters printed as a separate job so that my multifunction printer (savin c6045) can staple each letter separately. this requires (as far I can tell) that each letter print as a separate job any suggestions are appreciated. |
#5
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
thanks!
I'll try this out pronto "Doug Robbins - Word MVP" wrote: Execute the merge to a new document and then with that new document as the active document (displayed on the screen), running a macro containing the following code will send each letter to the printer as a separate document Dim i As Long With ActiveDocument For i = 1 To .Sections.Count .PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" & i Next i End With -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "DNimmo" wrote in message ... thank you for the quick response I have tried and am still trying to use the macro from your first link (@gmayor) but in my particular instance, the document gets reformatted from 8 pages to 14. this is highly not acceptable. this is what i'm currently researching (why it's reformatting) i'll look at the other links as well. THANKS!! "Peter Jamieson" wrote: You are correct that each merge produces a single print job, so you have to have some way to do one merge per source record. In the simple case where each of your 8-page documents relates to a single record in the data source, you can try the following macro, or you may find the approaches documented at http://www.gmayor.com/individual_merge_letters.htm more useful. 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 "DNimmo" wrote in message ... I have an 8 page document merging with 500 names (and other data) I want each of the letters printed as a separate job so that my multifunction printer (savin c6045) can staple each letter separately. this requires (as far I can tell) that each letter print as a separate job any suggestions are appreciated. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Margins In Print Jobs are Off | Microsoft Word Help | |||
Merging Word with a mutiple sheets Excel file | Mailmerge | |||
Print copies as separate jobs, not one big job | Microsoft Word Help | |||
second info page printing on all print jobs | Microsoft Word Help | |||
Watermark overheads in PDf and print jobs | Microsoft Word Help |