>10000 lines Excel - MailMerge with word via VBA Macro 
Author Message
 >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



Mon, 10 Oct 2005 21:22:43 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Word/Excel Mailmerge via VBA macro problem

2. Excel -> Word MailMerge (Excel Macro)

3. Excel Macro via Word VBA

4. Change a Style>Paragraph>line spacing value via VBA

5. Word 97 Macros > Word XP Macros

6. Populating a ListBox via a VBA macro when opening an Excel Workbook

7. Adding A Line To A Word Document Via VBA

8. Pasting Range from Excel 2002 via VBA to Word causes a New Workbook to open

9. Importing text file into Excel using VBA - from a word macro

10. Excel->VBA->Help->Visual Basic Help

11. Running a Word VBA sub/macro from Excel

12. Back to back Excel & Word VBA macros

 

 
Powered by phpBB® Forum Software