G
Guest
Hello,
I posted a previous question that asked about 2 different word references
being used in an access database. I guess there is a problem and I was
advised to try late binding vs early binding. I thought I rewrote the code
correctly, but I am getting a Data member not found error on the .mailmerge
action. Could someone look at the code below and perhaps see what I might
have done wrong?
Rick,
I tried using the late binding, but I received an error that said data
member not found. Perhaps if you look at this code you might be able to tell
me what I did wrong. Thanks, D.
Dim objWord As Object
Dim objDoc As Document
Set objWord = CreateObject("Word.Application")
objWord.Application.Visible = True
Set objDoc = objWord.Documents.Open(strDir & strDocumentName)
objdoc.MailMerge.OpenDataSource _
Name:="C:\Documents and Settings\D\Desktop\Projects\Project
Tracking.mdb", _
LinkToSource:=True, AddToRecentFiles:=False, _
Connection:="QUERY qselVendorNames", _
SQLStatement:=strSQL
P.S. I have defined strDir and strDocumentName
Thanks,
D.
I posted a previous question that asked about 2 different word references
being used in an access database. I guess there is a problem and I was
advised to try late binding vs early binding. I thought I rewrote the code
correctly, but I am getting a Data member not found error on the .mailmerge
action. Could someone look at the code below and perhaps see what I might
have done wrong?
Rick,
I tried using the late binding, but I received an error that said data
member not found. Perhaps if you look at this code you might be able to tell
me what I did wrong. Thanks, D.
Dim objWord As Object
Dim objDoc As Document
Set objWord = CreateObject("Word.Application")
objWord.Application.Visible = True
Set objDoc = objWord.Documents.Open(strDir & strDocumentName)
objdoc.MailMerge.OpenDataSource _
Name:="C:\Documents and Settings\D\Desktop\Projects\Project
Tracking.mdb", _
LinkToSource:=True, AddToRecentFiles:=False, _
Connection:="QUERY qselVendorNames", _
SQLStatement:=strSQL
P.S. I have defined strDir and strDocumentName
Thanks,
D.