Win 2k: Multiple Datasources, one document

C

Chris

Is this possible? I'm trying to create a mail merge in Word 2000 that
looks like this:

Dear <fields from mail merge source>

bla bla bla

<multi-row table generated from data relating to mail merge source>

Bla bla bla

Is this even possible or am I going to have to create this on with a
programming language on my web server?

An expedient answer is very much welcomed. As I'm going to have to
report on the feasibility of this by the end of the day.
Chris Weber
 
P

Peter Jamieson

Word isn't designed to do this. Some approaches are described at

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

Look for Mail Merge FAQ, Special Merges, Multiple items per condition.
However, be aware that you have little control over the layout when you use
a DATABASE field.

As long as you are using Word 2002/2003 you can consider using Mail Merge
events to insert the multi-row table. If you do this, you should probably
use a table with one record per letter as the mail merge data source, and
access the multi-row data using e.g. ADO from within the VBA event-handling
routines. You will at least need to have a way to count how many rows are
needed for each letter without trying to use the MailMErge.DataSource object
to move through the records. However, once you have gone that far, you might
decide it is easier to "roll your own" merge and avoid using Word Mailmerge
altogether.

Peter Jamieson
 
C

Chris

Yes, it is possible, check this reference out:
http://www.knowhow.com/Guides/CompoundMerges/CompoundMerge.htm

After a bit of work on the database form field I have this:

Dear <<fname>> <<lname>>:

Bla bla bla


{DATABASE \c "DATABASE=incentive_sites;DESCRIPTION=bla
DB;DSN=Incentives;OPTION=0;PWD=password_goes_here;PORT=0;SERVER=siteroot;UID=admin_username"
\s "SELECT stuff FROM DB WHERE hrid = '{MERGEFIELD hrid}' ORDER BY
hrid" \h}


Bla bla bla

The end product is slow to generate but very nice.
 

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