Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Jane Duddy Jane Duddy is offline
external usenet poster
 
Posts: 1
Default 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




  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Word2000 Use of ASK and IF does not give correct text

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






  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Jane Duddy Jane Duddy is offline
external usenet poster
 
Posts: 2
Default 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







Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:36 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"