IF field = 'X' Then....

P

Pyrite

Hi,

I am pretty good with Excel and Access but brand new to Word when doing
anything other than typing and formatting.

Basically I am creating a template that provides a number of prompts when
opened and then places them throughout the document so it is ready to print.

I have a couple of fill in's for date and names etc. I also have an ASK
field for Directors Name as it is placed at the top of the memo and also on
the signature line. The signature line refers to the bookmark created by the
ASK.

My problem is that the next line of the signature needs to change depending
on which Director has been entered e.g. John Smith should have Managing
Director underneath whereas Dave Jones should have Financial Director.

Is there a way to make the second line a sort of IF field that says IF
Director Name is 'x' then job title = 'x' ?

There will need to be about 7 combinations.

Thanks in advance.
 
P

Peter Jamieson

Yes, you can use

{ IF "{ REF TheBookmarkNameFromTheAskField }" = "John Smith" "Managing
Director" ""
}{ IF "{ REF TheBookmarkNameFromTheAskField }" = "Dave Jones" "Financial
Director" ""
}

etc. to insert the result directly, or

{ IF "{ REF TheBookmarkNameFromTheAskField }" = "John Smith" "{ SET
TheJobTitle "Managing Director" }" ""
}{ IF "{ REF TheBookmarkNameFromTheAskField }" = "Dave Jones" "{ SET
TheJobTitle "Financial Director" }" ""
}

then use

{ REF TheJobTitle }

to insert that job title. All the pairs of {} have to be the special
field code braces that you can insert using ctrl-F9.


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