J
John C
How do I call an MS Word Mail Merge document from VB.NET so it does not ask
the user for the MS Access Database Password? (not user password)
I am performing Word XP automation from a VB.NET program. The Word document
is set up to mail merge against an Access XP database. The Database has a
Database Password on it.
Without the database password, the document comes up just fine and without
any user interface intervention from MS Word.
I have tried a couple of commands that still popup the enter password dialog:
1.)
mWordDoc.MailMerge.OpenDataSource(
Name:="C:\Develop\TestMSWord\TestMSWord\bin\Docs\mydb.mdb",
LinkToSource:=True, PasswordDocument:="mypassword", SQLStatement:="TABLE
SellerInfo")
2)
mWordDoc.MailMerge.OpenDataSource( _
Name:="C:\Develop\TestMSWord\TestMSWord\bin\Docs\mydb.mdb", _
PasswordDocument:="mypassword", _
Connection:="Provider=Microsoft.Jet.OLEDB.4.0;Data Source & _
"C:\Develop\TestMSWord\TestMSWord\bin\Docs\mydb.mdb;" & _
"User Id=admin;Password=;Jet OLEDB
atabase Password=mypassword;", _
SQLStatement:="Select * from `SellerInfo`")
Thank you.
the user for the MS Access Database Password? (not user password)
I am performing Word XP automation from a VB.NET program. The Word document
is set up to mail merge against an Access XP database. The Database has a
Database Password on it.
Without the database password, the document comes up just fine and without
any user interface intervention from MS Word.
I have tried a couple of commands that still popup the enter password dialog:
1.)
mWordDoc.MailMerge.OpenDataSource(
Name:="C:\Develop\TestMSWord\TestMSWord\bin\Docs\mydb.mdb",
LinkToSource:=True, PasswordDocument:="mypassword", SQLStatement:="TABLE
SellerInfo")
2)
mWordDoc.MailMerge.OpenDataSource( _
Name:="C:\Develop\TestMSWord\TestMSWord\bin\Docs\mydb.mdb", _
PasswordDocument:="mypassword", _
Connection:="Provider=Microsoft.Jet.OLEDB.4.0;Data Source & _
"C:\Develop\TestMSWord\TestMSWord\bin\Docs\mydb.mdb;" & _
"User Id=admin;Password=;Jet OLEDB
SQLStatement:="Select * from `SellerInfo`")
Thank you.