nested codes

T

Tiffany

I want to create a merge document in word that has nested codes such as
if/then statements? I can do this with word perfect but I need to be able to
do this in word. Does anyone know if this is possible
 
P

Peter Jamieson

Yes, it is possible to nest field codes, but be aware that the way
WordPerfect works in this area is very different from Word.

To work with fields in Word it's useful to learn a few keystrokes:
a. alt-F9 to toggle between "field code" view and "results" view
b. ctrl-F9 to insert a new pair of the special "field braces" {}
c. F9 to update the selected fields.

The IF/THEn in Word looks like this:

{ IF comparand1 <comparison operator> comparand2 "result if true"
"result if false" }

Te results can contain pretty much any combinaiton of text and fields,
with some restrictions (e.g. the double-quote character)

So e.g. you could have

{ IF { MERGEFIELD myfield } > 0 "myfield = { MERGEFIELD myfield } and is
greater than zero" "myfield is { MERGEFIELD myfield } and is not greater
than zero" }

etc...


Peter Jamieson

http://tips.pjmsn.me.uk
 

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