I am trying to produce a template that will allow me to mail merge within
Word a number of different areas.
Can we assume that you are not having any problems with this? If so, can you
spell out what they are? It is useful to know
a. which version of Word you are using
b. what the data source is
This includes inserting a table (with the
borders) and then populating this with data.
If you are trying to produce a "parent/child" type report in Word, for
example where you have
Class details for class A
then Table containing list of pupils for class A
Class details for class B
then Table containing list of pupils for class B
Class details for class C
then Table containing list of pupils for class C
etc.
then be aware that Word is not designed to do this. You may be better off
trying to produce such a report in Access. Alternatively see Cindy Meister's
page at
http://homepage.swissonline.ch/cindymeister
and look for Mail Merge FAQ|Special merges|Multiple items per condition
The example she references does show how you can insert a table into a
document, but some people have difficulty getting the example to work, and
the method suffers from a number of limitations. The essence of it is:
a. use Tools|Customize to display the Database menu
b. use the Insert Database button to insert a table /selecting the "insert
as field" option/
c. use Alt-F9 to display the DATABASE field code and modify the SQL SELECT
statement in there to get the records you need. Because you can nest fields
inside other fields, you can reference fields in the record you are
currently merging, for example
{ DATABASE <connection details> \s
"SELECT * FROM mytable WHERE IDfield = '{ MERGEFIELD myIDfield }'" }
If that isn't what you are trying to do, can you please spell out what you
want.
Peter Jamieson