Word XP Mail Merge with "If" field

A

Amy Pasko

I am using Word XP and would like to create an IF field statement with
an "AND"

For example an ASK field is used to create a bookmark. An IF field is
then used to determine if a {FIELD}is = to text and if the bookmark is
equal to specific text. If both values are correct, then an
INCLUDETEXT is used to include a word document.

I can not figure out how to use the AND.
{ASK lors "Type 1 for Long Letterhead or 2 for Short Letterhead" \d
"2"}{IF{MERGEFIELD file_notes }="Miami" **AND SHOULD GO HERE**{REF
lors \h}="2"{INCLUDETEXT "C:\\letterhead.doc" \* MERGEFORMAT}" ""}

I would appreciate any help.

Thanks.Amy
 
P

Peter Jamieson

The simplest methof is probably

If condition-1 then
If condition-2 then
includetext
end if
end if

which being translated into field codes might be

{ IF { MERGEFIELD file_notes } = "Miami"
"{ IF { REF lors } = "2"
"{ INCLUDETEXT "C:\\letterhead.doc" }"
""
}"
""
}"

(the layout outside the quoted strings is not particularly important - this
can all be on one line in your 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