
>10000 lines Excel - MailMerge with word via VBA Macro
My printer-support sent me a macro to manage Word/Excel MailMerge with
some thousands of data-records. Works well with a laser-printer. As
it prints out every single letter there are problems with printing on
a copier. As the copier starts a new job for every document, we do
have
a time-problem.
With normal mailmerge function for ExcelWord it's possible to create
first a single document with multiple pages, each page containing a
document referring a line in Excel. But we have too much data records
to do it that way.
The provided code makes a document to print of each ExcelLine (data
record).
Here a part of the code as is:---
j = InputBox("Mit welchem Datensatz m?chten Sie beginnen ?", "1.ter
Datensatz")
f = InputBox("Bis zu welchem Datensatz m?chten Sie drucken ?",
"letzter Datensatz")
ActiveDocument.MailMerge.ViewMailMergeFieldCodes = wdToggle
ActiveDocument.MailMerge.DataSource.ActiveRecord = wdFirstRecord
For l = 1 To j - 1
ActiveDocument.MailMerge.DataSource.ActiveRecord =
wdNextRecord
Next l
For i = 1 To f - j + 1
ActiveDocument.PrintOut
ActiveDocument.MailMerge.DataSource.ActiveRecord = wdNextRecord
Next i
-----------end code sample
Is there a possibility to create a document with, lets say, 100
records, print out the document (containing 100 records) and get the
next 100 records then. And so on????? So the copier will start a new
print-job for every 100 pages and not for every single page.??
As I'm not very familiar with VBA, I don't know how to handle this.
Every advice is highly appreciated.
TIA
Curt Balluff