I am producing a marketing letter that will go to a range of organisations. I
have a field in the data table that identified the organisationtype and use
syntax similar to
{if {MERGEFIELD organisationtype} = "school" "then insert this text" 'else
insert this text."}
When I run the merge I get the the field code but not the text I want. What
am I doing incorrectly?
Try:
{IF "{MERGEFIELD organisationtype}" = "school" "true text" "false text."}
I've found that putting the quotation marks around the merge field makes IF
fields work better. May be superstition on my part, I haven't tested it in
years. I just do it.

Signature
Charles Kenyon
Word New User FAQ & Web Directory: http://addbalance.com/word
Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
>I am producing a marketing letter that will go to a range of organisations.
>I
[quoted text clipped - 7 lines]
> What
> am I doing incorrectly?
Peter Jamieson - 14 Apr 2005 15:36 GMT
> I've found that putting the quotation marks around the merge field makes
> IF fields work better. May be superstition on my part, I haven't tested it
> in years. I just do it.
It's a good defensive programming practice, particularly sice the "field
language" is not comprehensively specified. There are definitely occasions
when it makes a difference - there have been one or two examples in the
group in the past few months but I forget exactly what they were :-)
Peter Jamieson
> Try:
> {IF "{MERGEFIELD organisationtype}" = "school" "true text" "false text."}
[quoted text clipped - 14 lines]
>> What
>> am I doing incorrectly?
Are the {} all the special field braces you can get by pressing ctrl-F9?
Does the result of the organisationtype MERGEFIELD exactly match "school"
(all lower case etc.) ?
Peter Jamieson
>I am producing a marketing letter that will go to a range of organisations.
>I
[quoted text clipped - 7 lines]
> What
> am I doing incorrectly?
Smokey smith - 14 Apr 2005 23:38 GMT
Oops no.... that solved the problem Thank you for your prompt reply
> Are the {} all the special field braces you can get by pressing ctrl-F9?
>
[quoted text clipped - 13 lines]
> > What
> > am I doing incorrectly?