Nested if and includetext

L

Lupe

Hi,
Most probably this has a simple solution, but at the moment I cannot seem to
find it.
I have a master file wich reads text from another file based on several
conditions.
One of those fields has 5 or more options that can be filled in, but only
need to have a specific text, all the other options should have the same
text. So it's an IF THEN ELSE statement.
I have: If mergefield personalia is "Civil Registry", includetext text1, if
mergefield personalia is "company badge" includetext text2, all other options
includetext text3.
Thanks, Lupe
 
D

Doug Robbins - Word MVP

{ IF { MERGEFIELD personalia } = "Civil Registry" { INCLUDETEXT
"drive:\\path\\text1.doc" } { IF { MERGEFIELD Personalia } = "company badge"
{ INCLUDETEXT "drive:\\path\\text2.doc" } { INCLUDETEXT
"drive:\\path\\text3.doc" } } }

You must use Ctrl + F9 to insert each pair of field delimiters { } and you
will need to adjust the INCLUDETEXT fields shown above so that the actually
point to the required text.
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
L

Lupe

Doug, Many Thanks!
I figured it out via Word merge field IF THEN ELSE, but the other way around
(I used <> "civil..etc.), but this is much easier.
Lupe
 

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