Word2000 Use of ASK and IF does not give correct text

J

Jane Duddy

In mailmerge document have used ASK field to save user response in bookmark
which is then tested in IF fields to include (or not) different text in body
of document. Does not work. see below for what you see if you view document
with mergefields etc showing
I invite you to attend a { ASK bkFullHalfDayResponse "f for full day with
lunch, hl for half day with lunch, h for half day" }{ IF
bkFullHalfDayResponse=f "full day" "half day" }assessment centre.{ IF
bkFullHalfDayResponse=f "Lunch will be provided for you. If you have any
special dietary requirements then please let us know in advance." " " } .{ IF
bkFullHalfDayResponse=hl "Lunch will be provided for you. If you have any
special dietary requirements then please let us know in advance." " " }
Whatever the user types in in response to the ASK prompt they get 'full day'
for the first if and 2 paragraphs for dietary requirements text.
What am I doing wrong?
Thanks
 
P

Peter Jamieson

I suggest you try the following syntax in your IF fields:

{ IF { bkFullHalfDayResponse } = "f" "full day" "half day" }

or

{ IF { REF bkFullHalfDayResponse } = "f" "full day" "half day" }

Actually I prefer to play safe and use

{ IF "{ REF bkFullHalfDayResponse }" = "f" "full day" "half day" }

or even

{ IF "{ REF bkFullHalfDayResponse \*upper }" = "F" "full day" "half day" }

All the {} need to be the special field code braces you can insert using
ctrl-F9

[NB, you may find examples, e.g. on the Microsoft site, that suggest you can
use a bookmark name or mergefield name on its own, without the {} - it may
have worked once, and it may even work in some circumstances now, but at
best it's an unreliable practice. The same applies to {=} fields]

Peter Jamieson
 
J

Jane Duddy

Thanks very much Peter - I used the last full syntax and it worked a treat.

Peter Jamieson said:
I suggest you try the following syntax in your IF fields:

{ IF { bkFullHalfDayResponse } = "f" "full day" "half day" }

or

{ IF { REF bkFullHalfDayResponse } = "f" "full day" "half day" }

Actually I prefer to play safe and use

{ IF "{ REF bkFullHalfDayResponse }" = "f" "full day" "half day" }

or even

{ IF "{ REF bkFullHalfDayResponse \*upper }" = "F" "full day" "half day" }

All the {} need to be the special field code braces you can insert using
ctrl-F9

[NB, you may find examples, e.g. on the Microsoft site, that suggest you can
use a bookmark name or mergefield name on its own, without the {} - it may
have worked once, and it may even work in some circumstances now, but at
best it's an unreliable practice. The same applies to {=} fields]

Peter Jamieson


Jane Duddy said:
In mailmerge document have used ASK field to save user response in
bookmark
which is then tested in IF fields to include (or not) different text in
body
of document. Does not work. see below for what you see if you view
document
with mergefields etc showing
I invite you to attend a { ASK bkFullHalfDayResponse "f for full day with
lunch, hl for half day with lunch, h for half day" }{ IF
bkFullHalfDayResponse=f "full day" "half day" }assessment centre.{ IF
bkFullHalfDayResponse=f "Lunch will be provided for you. If you have any
special dietary requirements then please let us know in advance." " " }
.{ IF
bkFullHalfDayResponse=hl "Lunch will be provided for you. If you have any
special dietary requirements then please let us know in advance." " " }
Whatever the user types in in response to the ASK prompt they get 'full
day'
for the first if and 2 paragraphs for dietary requirements text.
What am I doing wrong?
Thanks
 

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