Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

word automation mail merge extremely slow

Status
Not open for further replies.

nuct

Programmer
Sep 5, 2001
103
Hi,

Im using this code:

****************************************

Dim objword, objdoc
Set objword = GetObject("c:\simon\mailmerge.doc", "word.document")
objword.Application.Visible = True

objword.MailMerge.OpenDataSource Name:="C:\simon\db2.mdb", LinkToSource:=True, Connection:="TABLE tblName", SQLStatement:="SELECT * FROM [tblName]"

objword.MailMerge.Execute

objword.Close

****************************************

to try and automate the mail merge process. It does work but its very very slow compared to when I manually open the document and hit the merge button. It might take 20 seconds to do 15 records for example.

If anyone else has a solution to this, or a completely different way of doing it, I would be most gratefull.

Cheers,

Simon.
 
It's probably worth a look at the mail merge document itself to check how the data is being passed.

I've had problems in the past with linking to MS Access via dde link - changing to odbc link and performing any query within the word document by ms query seems to be quicker and doesn't hit the processor quite as hard.

 
Yeah, I think I'll try ODBC.

Cheers

Simon.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top