I want to merge a Word document with a record in an Access (.adp) table - in SQL. I cannot get the syntax correct in the .OpenDataSource Name: = or how to get the SQLStatement:= defined correctly. My code now is:
sDBPath = "Y:\xxx\xxx\mydbname.adp"
With Doc.MailMerge
.OpenDataSource Name:=sdBPath, _
LinkToSource:="True", _
SQLStatement:="SELECT * from dbo.GI_mytblename"
etc...
etc..
Any help is really appreciated. Thanks.
sDBPath = "Y:\xxx\xxx\mydbname.adp"
With Doc.MailMerge
.OpenDataSource Name:=sdBPath, _
LinkToSource:="True", _
SQLStatement:="SELECT * from dbo.GI_mytblename"
etc...
etc..
Any help is really appreciated. Thanks.