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
--
Peter Jamieson
MS Word MVP
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
> You can use INCLUDETEXT fields to include stuff conditionally. But I
> wouldn't even go near normal Word "Master documents and subdocuments" to do
[quoted text clipped - 51 lines]
> > (any questions...please ask)
> > Jado
Peter Jamieson - 13 Nov 2003 13:52 GMT
> 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).
--
Peter Jamieson
MS Word MVP
> Thanks Peter...
>
[quoted text clipped - 71 lines]
> > > (any questions...please ask)
> > > Jado