Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mailmerge
Message
 
To
28/08/2002 08:48:02
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
00694358
Message ID:
00694392
Views:
12
That's not exactly the problem. On the fly I create a datasource in MS Word. After creating my datasource I edit my datasource. This action gives me an entry to a word-document containing 1 table including my header record.

The next step is expanding this table and fill all te cells with data.

oTable = oWord.Activedocument.Tables[1]
oRow = oTable.Rows[2] && The first row contains header information

SELECT myQuery
SCAN
FOR nField = 1 TO FCOUNT()
oRow.Cells[nField].Range.InsertAfter( EVAL( FIELDS( nField )))
ENDFOR
oRow = oTable.Rows.Add()
ENDSCAN
oRow.Delete()

This routine is very slow when I have to process 5000 records containing 21 fields. I need a solution to create in MS Word on the fly a datasource containing all my data.

The template used for the mailmerge is created by the user. I don't know the exact details of this letter.

Sander
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform