filling a Microsoft word document table with data from ACCESS 03 s

M

Martin

I am trying to automate many different office forms word documents creation
by creating word templates. I have been successful at several so far using
bookmarks. These are very simple 1 page layouts. I can not find any help on
how to populate a word table with say an SQL statment that outputs 24 names
of students.

My question is how do I do this? Do I make 24 individual bookmarks for the
differnt rows of information in the word table.

I have been working in access for over 15 years and this one has got me
stumped. Anyone who can help, I will be very greatfull.
 
A

Albert D. Kallal

I have a nice working sample that does a merge of the current record to
word.

The sample I have can be found here:
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

What is nice/interesting about my sample is that is specially designed to
enable ANY form with ONE LINE of code....

Thus, each time you build a new form, you can word merge enable it with
great ease.

Make sure you read the instructions from above, and you should eventually
get to the following page
http://www.members.shaw.ca/AlbertKallal/wordmerge/page2.html


Note that the merge can also use a query, and thus you don't have to merge
just "one" record..

After the merge occurs, you get a plain document WITHOUT any merge fields,
and this allows the end user to save, edit, or even email the document
(since the merge fields are gone after the merge occurs).

Give the above a try....

HOWEVER:

The built in word merge allows "one" record to fill out fields in the
document.

It sounds like you need/want a "table" or repeating data into the doucment.
In this kind of situation I suggest that you actually use a report in MS
access with a sub report. you can then send that report to word, warned
that are cases even if pdf is better because it retains its formatting.

Keep in mind that inserting a table into word document is not really a
technical problem in as much as the user interface problem. If you can come
up with a nice user interface that says which particular child table that
you want the records to be repeated from, the kind of table formatting and
style of that table etc and I would build the code. in other words it's not
hard to write the code to make a repeating document was repeating data in
it, what it is hard to do it is to come up with the user interface that
allows general users to select that kind of information they want to insert
into the document. so this is not really a technical problem to solve, it's
the user interface problem that no one's come up with an easy way of doing
this and asking the user the right kinds of questions.

There are samples and ideas on how to do this at:

http://homepage.swissonline.ch/cindymeister/MergFram.htm

look on the left side for speical merges. The one you want is

Multiple items per condition

The above sample means that you tend to have to write new code for each
merge case you do. What we really need to do is build some kind a user
interface to ask the above series of questions. This is the problem one's
been able to sove and tell me. In other words, what are those particular set
of questions are supposed to be!

As I said this is not really a technical problem in terms of code, as the
above link gives an sample on how to merge multiple records into a single
document. The "real" problem here is the user interface question and how
we're going to present and ask questions as to what's going to be merged
inside of the document...
 
M

Martin

WOW. This is a lot more difficult than I thought. Will take me a couple of
days to go through the example you provided.

Thank you very much for your help.

Thank you, thank you, thank you.
 
M

Martin

Thank you for your quick response. I will look over and search the links you
provided to see if I can use the examples.

Thank you again.
 

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