Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Word From Access

Status
Not open for further replies.

jtlawn

Programmer
Mar 23, 2000
15
0
0
US
I would like to automate a form letter. I would like to create a form letter in Word and populate it with data from multiple access tables. Is it possible to write a macro that can run an Access query, then pass the values to form letter in Word? Then make the letters print?
Joe Lawn
jtlawn@hotmail.com

 
Don't use macros...

Create a query in Access for what data you need and use it to merge with your Word merge file.

When you create your merge document in Word, have it access that query you created.

That's a simple way..

HTH

Mary :eek:)



 
Thank You,

My question now would be, can I print this from an Access form? If so, how would I go about that, if not how do I have the users access and print the letters?
Joe Lawn
jtlawn@hotmail.com

 
Your best bet would be to create a button that would launch the word merge file from Access.

Example code for Sub MergeButton_Click() (this depends on what you call your button):


Set oApp = GetObject(, "Word.Application")
oApp.Visible = True
oApp.Documents.Open "c:\data\shortsub.doc"


And this will merge everything in the query.

After the merge, the user can then click the print button to print.


HTH

Mary :)
 
Thank You,

I will let you know how it all works out.

Joe
Joe Lawn
jtlawn@hotmail.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top