Microsoft Office Tutorials and References
In Depth Information
Mail Merge: Creating a One-to-Many List
ID number, but it can be any value unique to
each merge record.
d. If this field's value needs to be displayed in
the list result, this field name must be
specified twice because the same value would
repeat for each list entry, which is usually
(The list of data is read from the table into a
delimited string of text.)
a. Delimited means that each field's and each
record's value are separated from the others
by a particular character. Word can convert a
delimited text string into a table.
b. The record separator must always be a
paragraph mark; the field separator can be
any character. Choose one that is not present
in the data.
2. Prepare the mail merge main document normally. Place a bookmark
where the list should be inserted. In the sample macro it is named
GradeTable, but you can use any name you wish. Just be sure to change
it in the macro, as described further down.
3. Go into Tools | References in the VBE and activate the checkbox next to
one of the Microsoft ActiveX Data Object libraries (ADO). Any version
will do; the sample file references version 2.0.
4. ADO connections are application-specific. If an Excel table is used
instead of an Access database, a different connection ('conn' in the
procedure 'GetData') is needed.
Procedures Section. For other database types, see the information on
ADO OLE DB connections at http://www.able-consulting.com/tech.htm . If
the data is in a Word table, see the code for generating an MS Graph
chart in the ‘Mail Merge: Merging with a Chart’ process, which follows.