M
mdupris
OK, I'm baffled. I have an Access applicaiton fronting SQL Server and
used by 15-20 folks at any one itme. One of the features is to fire off
Word sessions to open documents which are mail merges into the active
record. The key peices of VBA code looks like this:
sSQL = "SELECT * FROM wherever WHERE whatever " = " & what2
sDSNName = "what3.dsn"
Set gobjWordApp = CreateObject("Word.Application")
gobjWordApp.Documents.Open FileName:=gsDocFullPathName,
ConfirmConversions:=False, _
ReadOnly:=True, AddToRecentFiles:=False, PasswordDocument:="",
_
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="",
_
WritePasswordTemplate:="", Format:=wdOpenFormatAuto
gobjWordApp.ActiveDocument.MailMerge.OpenDataSource _
Name:=sDSNName, _
Connection:="FILEDSN=" & sDSNName & ";", _
SQLStatement:=sSQL, _
SQLStatement1:="", _
SubType:=wdMergeSubTypeWord2000
And the mail merge itself happens just fine. The problem is that
occasionally (and there seems no consistency here) a second Access
session is opened coincident to the mail merge. It is invisible to the
user; it can be killed within Task Manager with no impact to either the
session with the ADP file or the Word session. The killer problem is
that this Access session sucks up virtually all available CPU time
bringing things to a crawl -- until the process is killed at the system
level.
Anyone have a clue about what's happening here? Even better. anyone
know how to prevent it -- or at least detect it programmatically?
Thanx!
= Marchand =
Anyone
used by 15-20 folks at any one itme. One of the features is to fire off
Word sessions to open documents which are mail merges into the active
record. The key peices of VBA code looks like this:
sSQL = "SELECT * FROM wherever WHERE whatever " = " & what2
sDSNName = "what3.dsn"
Set gobjWordApp = CreateObject("Word.Application")
gobjWordApp.Documents.Open FileName:=gsDocFullPathName,
ConfirmConversions:=False, _
ReadOnly:=True, AddToRecentFiles:=False, PasswordDocument:="",
_
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="",
_
WritePasswordTemplate:="", Format:=wdOpenFormatAuto
gobjWordApp.ActiveDocument.MailMerge.OpenDataSource _
Name:=sDSNName, _
Connection:="FILEDSN=" & sDSNName & ";", _
SQLStatement:=sSQL, _
SQLStatement1:="", _
SubType:=wdMergeSubTypeWord2000
And the mail merge itself happens just fine. The problem is that
occasionally (and there seems no consistency here) a second Access
session is opened coincident to the mail merge. It is invisible to the
user; it can be killed within Task Manager with no impact to either the
session with the ADP file or the Word session. The killer problem is
that this Access session sucks up virtually all available CPU time
bringing things to a crawl -- until the process is killed at the system
level.
Anyone have a clue about what's happening here? Even better. anyone
know how to prevent it -- or at least detect it programmatically?
Thanx!
= Marchand =
Anyone