Hi,
I have searched the forums but cant seem to find a similar problem anywhere.
I am using a shared Access Database over a network with 8 users. I can successfully run an automated mail merge to Word with the following code;
********
Dim stDocName As String
stDocName = "qryCreateCandidateCVBasicDetails"
DoCmd.SetWarnings False
DoCmd.OpenQuery stDocName, acNormal, acEdit
Dim objWord As Word.Document
Set objWord = GetObject("X:\CRS Documents\Database Templates\CRS CANDIDATE CV.dot", "Word.Document")
objWord.Application.Visible = True
objWord.MailMerge.OpenDataSource _
Name:="X:\CRS Documents\CRS Database\CRS Database V3.mdb", _
LinkToSource:=True, _
Connection:="tblCandidateCV1", _
SQLStatement:="SELECT * FROM [tblCandidateCV1]"
objWord.MailMerge.Destination = wdSendToNewDocument
objWord.MailMerge.Execute
objWord.Application.Documents(2).Close wdDoNotSaveChanges
Set objWord = Nothing
**********
For some reason on one of the PC's will not run this code; instead of executing the merge they get a message asking them to connect to a data source. It is possible to then browse and connect to the data source manually - but I cant understand why it isnt executing properly and merging the data automatically.
4 PC's on the network are running Windows XP Pro, the others are on Windows 2003. The PC with the problem is running on 2003 (although others with the same software seem to work fine).
Can anyone shed any light on this or suggest anything I could try to resolve this problem.
Any feedback would be most welcome. Thanks in advance.
I have searched the forums but cant seem to find a similar problem anywhere.
I am using a shared Access Database over a network with 8 users. I can successfully run an automated mail merge to Word with the following code;
********
Dim stDocName As String
stDocName = "qryCreateCandidateCVBasicDetails"
DoCmd.SetWarnings False
DoCmd.OpenQuery stDocName, acNormal, acEdit
Dim objWord As Word.Document
Set objWord = GetObject("X:\CRS Documents\Database Templates\CRS CANDIDATE CV.dot", "Word.Document")
objWord.Application.Visible = True
objWord.MailMerge.OpenDataSource _
Name:="X:\CRS Documents\CRS Database\CRS Database V3.mdb", _
LinkToSource:=True, _
Connection:="tblCandidateCV1", _
SQLStatement:="SELECT * FROM [tblCandidateCV1]"
objWord.MailMerge.Destination = wdSendToNewDocument
objWord.MailMerge.Execute
objWord.Application.Documents(2).Close wdDoNotSaveChanges
Set objWord = Nothing
**********
For some reason on one of the PC's will not run this code; instead of executing the merge they get a message asking them to connect to a data source. It is possible to then browse and connect to the data source manually - but I cant understand why it isnt executing properly and merging the data automatically.
4 PC's on the network are running Windows XP Pro, the others are on Windows 2003. The PC with the problem is running on 2003 (although others with the same software seem to work fine).
Can anyone shed any light on this or suggest anything I could try to resolve this problem.
Any feedback would be most welcome. Thanks in advance.