SubDocuments - In a Mail Merge

J

Jado

Hi

i want to run a mail merge process that will consist of 2 parts out of a
possible 3.

Part 1 = Master Doc
Part 2 = SubDoc 1
Part 3 = SubDoc 2

i want to produce either Part 1 & Part 2
or
Part 1 & Part 3

all 3 parts us merge fields residing in the same Access 97 table
and i want to inclued with Part 1 ..either P2 or P3 based on a value in a
field..

say there are 5 records to be merged....

how do i get word to look at the value in a field and include the correct
SubDocument for that record??

i haven't used SubDoc's in any way before..so a complete proceadure would be
a great help!

Thanks All
(any questions...please ask)
Jado
 
P

Peter Jamieson

You can use INCLUDETEXT fields to include stuff conditionally. But I
wouldn't even go near normal Word "Master documents and subdocuments" to do
this - just use regular documents and ensure that any styles you use are set
up the same way in each document.

Then either use nested IF feilds with INCLUDETEXT, e.g.

Part 1 is the fist part of your mail merge main document. Then have
something like

{ IF { MERGEFIELD SecondPart } = 2
"{ INCLUDETEXT "c:\\pathname\\part2.doc" }"
"{ INCLUDETEXT "c:\\pathname\\part3.doc" }" }

Or, if you can relate the database field to the document name in a useful
way, you might use something like

{ INCLUDETEXT "c:\\pathname\\part{ MERGEFIELD SecondPart }.doc" }

All the {} need to be the special field code braces you can enter using
ctrl0F9
 
J

Jado

Thanks Peter...

but before i start...

the sub parts of the main document also contain MergeFields which are held
in the same datasource! (not just static text)

so what i am trying to build is a dynamic MailMerge template...

will this work as you explained..?

Thanks

Jado
 
P

Peter Jamieson

will this work as you explained..?

The fields in INCLUDETEXTed documents should work - in most situations at
any rate - as if they were part of the main document.

The INCLUDETEXTed documents do not need to be attached to the Mail Merge
Data Source when you run the merge (I don't think it really matters if they
/are/ attached, but I would probably attach each subdocument to the data
source to make it easy to insert the merge fields, then restore each
subdocuments to a normal, non-mail merge document).
 

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