Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Word2000 Use of ASK and IF does not give correct text
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 |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Word2000 Use of ASK and IF does not give correct text
Thanks very much Peter - I used the last full syntax and it worked a treat.
"Peter Jamieson" wrote: 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" Jane wrote in message ... 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 |