L
Lidia Fernandes
Hi
I am getting error Code = 5922 "Word was unable to open
the datasource" when running mail merge using MS-Word 2000
in some PC's. In another PC's it all works great.
I am getting information from the SQL Server (by OBDC) in
my VBA code. Here is code where I am getting error on
OpenDataSource method.
Thanks in advance for any help.
Lidia
'...
With ActiveDocument.MailMerge
.MainDocumentType = wdFormLetters
constr = "DSN=bddata;UID=lgWord;PWD=1234;
sqlstr = " mp_docword " & NAluno & ",'" &
LCursos.Column(4, Me.LCursos.ListIndex) & "', '" &
Global_Identificacao & "', " & LCursos.Column(1,
Me.LCursos.ListIndex) & ", '" & LCursos.Value & "' , '" &
LCursos.Column(2, Me.LCursos.ListIndex) & "', '1','GET' "
.OpenDataSource Name:="", _
Connection:=constr, _
SQLStatement:=sqlstr, _
LinkToSource:=False
End With
I am getting error Code = 5922 "Word was unable to open
the datasource" when running mail merge using MS-Word 2000
in some PC's. In another PC's it all works great.
I am getting information from the SQL Server (by OBDC) in
my VBA code. Here is code where I am getting error on
OpenDataSource method.
Thanks in advance for any help.
Lidia
'...
With ActiveDocument.MailMerge
.MainDocumentType = wdFormLetters
constr = "DSN=bddata;UID=lgWord;PWD=1234;
sqlstr = " mp_docword " & NAluno & ",'" &
LCursos.Column(4, Me.LCursos.ListIndex) & "', '" &
Global_Identificacao & "', " & LCursos.Column(1,
Me.LCursos.ListIndex) & ", '" & LCursos.Value & "' , '" &
LCursos.Column(2, Me.LCursos.ListIndex) & "', '1','GET' "
.OpenDataSource Name:="", _
Connection:=constr, _
SQLStatement:=sqlstr, _
LinkToSource:=False
End With