I
InvisibleDuncan
I'm in the process of upgrading an Access 97 application to Access 2003. This
has mostly been pretty smooth, but I'm having major problems with a process
that generates mailmerge documents (also moving from Word 97 to Word 2003).
Taking a specific example, my initial connection string (Access 97 to Word
97) was:
objDoc.MailMerge.OpenDataSource Name:=CurrentDb.Name, OpenExclusive:=False,
LinkToSource:=True, _
AddToRecentFiles:=False, Connection:="TABLE " & strTableName
This wasn't working at all in Access 2003 - every time it tried, it popped
up a dialog box asking me to select the table. I found the reason for that in
this article (http://support.microsoft.com/kb/289830), and
therefore changed my code to:
objDoc.MailMerge.OpenDataSource Name:=CurrentDb.Name, OpenExclusive:=False,
LinkToSource:=True, _
AddToRecentFiles:=False, SQLStatement:="Select * From " & strTableName, _
SubType:=wdMergeSubTypeWord2000
This now works in Access 2003, but it's appallingly slow. Whereas before it
would take maybe five seconds to apply the connection string and execute the
mailmerge, it is now taking up to two minutes. This is bad enough for one
document, but this is part of a batch process that runs overnight and
involves several hundred mail merges.
This looks like it might put the kibosh on us upgrading to 2003, which would
be a real nuisance. Does anyone have any way around it?
Thanks...
has mostly been pretty smooth, but I'm having major problems with a process
that generates mailmerge documents (also moving from Word 97 to Word 2003).
Taking a specific example, my initial connection string (Access 97 to Word
97) was:
objDoc.MailMerge.OpenDataSource Name:=CurrentDb.Name, OpenExclusive:=False,
LinkToSource:=True, _
AddToRecentFiles:=False, Connection:="TABLE " & strTableName
This wasn't working at all in Access 2003 - every time it tried, it popped
up a dialog box asking me to select the table. I found the reason for that in
this article (http://support.microsoft.com/kb/289830), and
therefore changed my code to:
objDoc.MailMerge.OpenDataSource Name:=CurrentDb.Name, OpenExclusive:=False,
LinkToSource:=True, _
AddToRecentFiles:=False, SQLStatement:="Select * From " & strTableName, _
SubType:=wdMergeSubTypeWord2000
This now works in Access 2003, but it's appallingly slow. Whereas before it
would take maybe five seconds to apply the connection string and execute the
mailmerge, it is now taking up to two minutes. This is bad enough for one
document, but this is part of a batch process that runs overnight and
involves several hundred mail merges.
This looks like it might put the kibosh on us upgrading to 2003, which would
be a real nuisance. Does anyone have any way around it?
Thanks...