Hi
I am trying to generate a word 2000 mail merge document in VB. The problem I am having is that my datasource is a query in Access that takes 3 parameters, I can't figure out how to pass the parameters to the query from the word.document.mailmerger.opendatasource method
without having the user prompted for them.
I assume it has something to do with the SQLstatement value
but I cant figure it out.
what I currently have is:
mydoc.MailMerge.OpenDataSource Name:=App.Path & "\firstcontacttest.mdb", _
connection:="QUERY GetHomeownerByBookcodeMonthYear", _
SQLStatement:="SELECT * FROM [GetHomeownerByBookcodeMonthYear]"
this works and I am able to generate my output document from it but I am prompted for the Parameters.
I need a way to pass the parameters from my program directly to the query
does anyone have any ideas?
I am trying to generate a word 2000 mail merge document in VB. The problem I am having is that my datasource is a query in Access that takes 3 parameters, I can't figure out how to pass the parameters to the query from the word.document.mailmerger.opendatasource method
without having the user prompted for them.
I assume it has something to do with the SQLstatement value
but I cant figure it out.
what I currently have is:
mydoc.MailMerge.OpenDataSource Name:=App.Path & "\firstcontacttest.mdb", _
connection:="QUERY GetHomeownerByBookcodeMonthYear", _
SQLStatement:="SELECT * FROM [GetHomeownerByBookcodeMonthYear]"
this works and I am able to generate my output document from it but I am prompted for the Parameters.
I need a way to pass the parameters from my program directly to the query
does anyone have any ideas?