A
ashish taralekar
Hi,
I am doing mail merge automation using vb.net and MS Access as
database. I passed the following parameters to the OpenDataSource
method of MailMerge.
Wordapp.ActiveDocument.MailMerge.OpenDataSource(Name:="C:\Test.mdb",
ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True,
AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="",
WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False,
Format:=Word.WdOpenFormat.wdOpenFormatText,
Connection:="Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User
ID=Admin;Data Source=C:\Test.mdb;Mode=Read;Extended
Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry
Path="""";Jet OLEDBatabase Password="""";Jet OLEDB:Engine Type=5",
SQLStatement:=SelectQuery1forMailMerge,
SQLStatement1:=SelectQuery2forMailMerge,
SubType:=Word.WdMergeSubType.wdMergeSubTypeAccess)
In above code i have used two sql queries (SelectQuery1forMailMerge,
SelectQuery2forMailMerge) because my select query exceeds 255
characters.
But, by using the above code I am getting the "Confirm Data Source"
dialog box.
So, please suggest me some solution to suppress this dialog and to
work the mail merging successful.
Thanks,
Ashish Taralekar.
I am doing mail merge automation using vb.net and MS Access as
database. I passed the following parameters to the OpenDataSource
method of MailMerge.
Wordapp.ActiveDocument.MailMerge.OpenDataSource(Name:="C:\Test.mdb",
ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True,
AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="",
WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False,
Format:=Word.WdOpenFormat.wdOpenFormatText,
Connection:="Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User
ID=Admin;Data Source=C:\Test.mdb;Mode=Read;Extended
Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry
Path="""";Jet OLEDBatabase Password="""";Jet OLEDB:Engine Type=5",
SQLStatement:=SelectQuery1forMailMerge,
SQLStatement1:=SelectQuery2forMailMerge,
SubType:=Word.WdMergeSubType.wdMergeSubTypeAccess)
In above code i have used two sql queries (SelectQuery1forMailMerge,
SelectQuery2forMailMerge) because my select query exceeds 255
characters.
But, by using the above code I am getting the "Confirm Data Source"
dialog box.
So, please suggest me some solution to suppress this dialog and to
work the mail merging successful.
Thanks,
Ashish Taralekar.