Automated Merge from Access to Word

M

Mike

I have a database that I've put together that consists of three letters that
need to be generated for the user. Each letter has its own query that I have
already built which determines which records belong in which category. Again
there are only 3 letters/categories in which can be generated. At the
moment, I've created a form with seperate buttons that run each function.
For instance, on the form, I have a button called "Update Letter A", which in
turn runs the query I have built specifically for that letter. This is a
make table query so after it is ran, the table associated with this query
gets updated. After that is selected the user presses the "Merge Letter A"
button. This in turn opens another form where the user must select the
letter AGAIN and run the merge again. This part was created from finding
pieces of information on the internet and a whole lot of trial and error in
order to get it work. It works however what I'm trying to do is press ONE
button that does it all. Like a macro of some sort. Is there a way that I
can create a button that simply runs the queries which differentiate the
letter type, updates the table data to be merged, then opens MS Word and
merges the data? If so, how would I go about doing this?
 
M

Mike

Hi Ken! Thanks for your quick response. I believe I've looked at this once
before and I apolgize but I think its a little advanced for what I'm capable
of. Ultimately I'm looking for the user to put in a bunch of cases into the
database. Each case consists of customer info, customer family info, etc.
When the user is ready to print her letters, I have it set in such a way that
the user will input a date range as to which cases were inputted into the
system. When the user inputs these dates, a query runs in the background to
distribute all the cases related. I'm going to continue to look thru the
link you sent me, hopefully something will ignite in my brain. But for now,
I'm thinking I will need some sort of macro to run the query based on the
dates the user inputs then in turn opening Word to run the merge on the
queried data. Does this make any sense?


Mike
 
K

Ken Sheridan

Why a macro rather than code? The merge routines in my demo should do what
you want. You'll notice that they do evaluate the query's parameters, which
would be the controls in which the dates are entered in your case, so that
aspect is already covered. What data is used for the merge is simply a case
of using your query and your merge template with fields corresponding to the
data returned by the query, rather than the example query and letter template
which the demo uses.

Albert D. Kallal regularly posts a link to a ' super easy' (his words)
routine he's produced for merging from Access:


http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html


You might like to see if that fits the bill.

Ken Sheridan
Stafford, England
 
T

Tony Toews [MVP]

Mike said:
Is there a way that I
can create a button that simply runs the queries which differentiate the
letter type, updates the table data to be merged, then opens MS Word and
merges the data?

Albert Kallal's Super Easy Word Merge - Scroll down a ways
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top