Hi: Using VB6, Access2000, Word2000
I trying to do a mailmerge using VB6 & Word2000 with an Access2000
password protected database. I don't know how to provide the password
to the string.
Normally when accesing the db I connect as follows:
VB Code:
'adoConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ '" Data Source=\\BigDaddy\Datalib\MegaOne.mdb; Persist Security Info=False; Jet OLEDB:Database Password=DogDayAfternoon23x "
I tried the above code but got errors
The following is what I'm currently using, but it prompts me to
enter the password, which I do not want to happen once itgets into production.
VB Code:
' Set the mail merge data source as the MegaOne.mdb database. objWord.MailMerge.OpenDataSource _ Name:="\\BigDaddy\Datalib\MegaOne.mdb", _ LinkToSource:=True, _ Connection:="TABLE Customers", _ SQLStatement:=" SELECT " & _ " CustAuthorizedFirstName, CustAuthorizedLastName," & _ " CustDepartment, CustCompanyName, " & _ " CustAddress1, CustAddress2, " & _ " CustCity, CustState, CustZipcode, " & _ " CustBalance " & _ " FROM " & _ " [Customers]" & _ " Where " & _ " CustBalance > 0 "
The second problem I'm having here is that the document is set with a font size of 12 but when prints, the first word of the merged fields are printed with a font size of 10 instead of the original document which as I stated is set for 12.
Can someone shed some light?
Thanks




Reply With Quote