Here si the basic situation my company prints up multiple docs per client.
At present we have a mail merge between word and our access database. We open the mail merge doc use the find in field command search for the user name and then when we find it select it and populate all the fields.
Here is what I want to do.
I want to have access open to one of our clients and there to be a command button that I click on and then the word document is printed with the information taken from our clients database table ie: Name field populates <<name>> on the mail merge doc
Here is the nut and bolts of what I am using
Private Sub PrintDoc_Click()
Dim WordObj As Object
Me![OLEObj].Verb = -2 'opens app
Me![OLEObj].Action = 7 'acctivates the app
Set WordObj = Me![OLEObj].Object.Application
WordObj.PrintOut Background:=False
WordObj.Quit
Set WordObj = Nothing
End Sub
Obviously I need a lot more than that.
I am a VBA neophyte any ideas?
Marc
At present we have a mail merge between word and our access database. We open the mail merge doc use the find in field command search for the user name and then when we find it select it and populate all the fields.
Here is what I want to do.
I want to have access open to one of our clients and there to be a command button that I click on and then the word document is printed with the information taken from our clients database table ie: Name field populates <<name>> on the mail merge doc
Here is the nut and bolts of what I am using
Private Sub PrintDoc_Click()
Dim WordObj As Object
Me![OLEObj].Verb = -2 'opens app
Me![OLEObj].Action = 7 'acctivates the app
Set WordObj = Me![OLEObj].Object.Application
WordObj.PrintOut Background:=False
WordObj.Quit
Set WordObj = Nothing
End Sub
Obviously I need a lot more than that.
I am a VBA neophyte any ideas?
Marc