Access 97 to Word Mail Merge Automation 
Author Message
 Access 97 to Word Mail Merge Automation

I'm trying to merge two fields (FirstName, LastName) from a table in
Access 97 with a memo document in Word 97 using Automation.  The example
code that I have found using DDE mailmerge uses Word as the Controller
and Access as the Server.

I need to do this using Access as the Controller and Word as the Server
instead. I have following code in an Access module.

With objWord.ActiveDocument
    .MailMerge.OpenDataSource Name:="d:\database\database.mdb",
LinkToSource:=True,  Connection:="TABLE tblUsers", SQLStatement:="SELECT
* FROM [tblEmployees] WHERE  [Exempt] = True AND [Visitor]=False ORDER
BY [LastName], [FirstName]"
    .MailMerge.Execute
End With

This works, but the merge process is very slow. It merges one record
about every second or less. The CPU is pegged at 100% during the merging
plus about 15 seconds afterwards. I only have about 50 records that get
merged.

Is there a better method for my situation? It seem like I'm trying to
open a database that I'm already in which is causing the problem?.

Any suggestions is appreciated.

Brad
Please remove NoSpaM from e-mail



Fri, 27 Jul 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Mail merge error: Access 97 to Word 97

2. Word/Access mail merge automation help needed

3. Mail Merge with Word 97

4. MS Word 97 Mail Merge with Oracle Datasource?

5. VB6 and Word 97 Mail Merge

6. Create Form Letter in Word 97 without using Mail Merge

7. Word 97 Mail Merge with VB

8. MS Word 97 Mail Merge with Oracle Datasource?

9. Word 97 mail merge

10. Automation seems to hang with Access 97 / Word 97

11. Automation Error when automating Word 97 from Access 97

12. Sending text to Word 97 from Access 97 using OLE automation

 

 
Powered by phpBB® Forum Software