Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Boots
 
Posts: n/a
Default using iif statement

Hi.
Can I tweak a mergefield contents so that if the field is blank it stays
blank and if it contains a number it adds 1000000 to it?
thanks
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default using iif statement

You could try a nested field

{ IF "{ MERGEFIELD myfield }" = "" "" "{ ={ MERGEFIELD
myfield }+1000000 }" }

(all the {} need to be the special field braces you can insert using
ctrl-F9.

That won't work if your field can contain non-numeric text, e.g. " " or
"abc" :-)

Peter Jamieson
"Boots" wrote in message
...
Hi.
Can I tweak a mergefield contents so that if the field is blank it stays
blank and if it contains a number it adds 1000000 to it?
thanks



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Boots
 
Posts: n/a
Default using iif statement

thanks for your response. I tried this
{ IF "{MERGEFIELD Control_Num}" = "" "" "{ ={ MERGEFIELD Control_Num
}+1000000 }" }
but ot deosn;t seem to work. I created the braces using ctrl + f9.

Boots

"Peter Jamieson" wrote:

You could try a nested field

{ IF "{ MERGEFIELD myfield }" = "" "" "{ ={ MERGEFIELD
myfield }+1000000 }" }

(all the {} need to be the special field braces you can insert using
ctrl-F9.

That won't work if your field can contain non-numeric text, e.g. " " or
"abc" :-)

Peter Jamieson
"Boots" wrote in message
...
Hi.
Can I tweak a mergefield contents so that if the field is blank it stays
blank and if it contains a number it adds 1000000 to it?
thanks




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Boots
 
Posts: n/a
Default using iif statement

Sorry it does work. I'd spelt control wrong. thanks

"Peter Jamieson" wrote:

You could try a nested field

{ IF "{ MERGEFIELD myfield }" = "" "" "{ ={ MERGEFIELD
myfield }+1000000 }" }

(all the {} need to be the special field braces you can insert using
ctrl-F9.

That won't work if your field can contain non-numeric text, e.g. " " or
"abc" :-)

Peter Jamieson
"Boots" wrote in message
...
Hi.
Can I tweak a mergefield contents so that if the field is blank it stays
blank and if it contains a number it adds 1000000 to it?
thanks




Reply
Thread Tools
Display Modes

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using an If Statement Kelly Mailmerge 6 September 28th 07 07:31 PM
Q: IF statement in table in Word JIM.H. Microsoft Word Help 1 November 4th 05 11:18 PM
Possible BUG: Multiple HTTPrequests send from one includetext statement Oliver Mailmerge 2 April 18th 05 09:46 AM
How do I copy a scanned signature into an if/or statement in Word mcgowan Mailmerge 2 February 1st 05 06:37 AM
Insert carriage return in mergefield statement dixie Mailmerge 2 December 22nd 04 03:42 AM


All times are GMT +1. The time now is 11:02 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"