Getting data into a Word template

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all

I have a form that shows the main contact details for a company that we deal
with, plus a tab control that displays various things, one of them being the
details of the actual contacts we speak to at that company (as there may be
more than one at the same office.)

I would like to be able to add some buttons for letter and invoice (etc)
creation, so that I can automatically open a Word template and have the
company and contact details filled in for me, following which I can fill in
the main body of the document myself.

The company and contact details are stored in separate tables though, and I
have a relationship set up on a customerID number.

What do I need to do to be able to get this information into Word??

(Sorry for all the questions lately! Difficult trying to run a company and
be the accountant/dogsbody/IT manager and a host of other different roles all
at the same time!!)

Ali
 
Ali

Don't worry about posting question here -- that's what the newsgroups are
for.

(and if you're wearing that many hats, I suspect you aren't getting much
sleep!)

One approach to using data from Access in Word documents is to use Word
merge documents. The generic approach involves:
* creating the query that extracts the data you need to merge in
* creating code behind a button that exports the query results to a Word
text (data) file
* creating a Word merge document that uses the data
* adding code to the button that hyperlinks to the Word document

You'll be prompted to load the data when Word opens.

Depending on your skill/experience in Word & Access, it might take 2-4 hours
to get the kinks worked out.

Good luck!

Jeff Boyce
<Office/Access MVP>
 
Back
Top