Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Simon Simon is offline
external usenet poster
 
Posts: 33
Default Using AND in a field code

I'm trying to use field codes, and distilled down to a test case with a
formula embedded in the first IF expression:

{IF {=AND(12,13)} = 1 "OK" "BAD"}

Looks simple enough - but I can't get this to display 'OK' - even when I
update the field. I did see it work - but now it's gone again. Seems utterly
unreliable. Is this a bug and is there a fix?
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Astrid Astrid is offline
external usenet poster
 
Posts: 3
Default Using AND in a field code

Hi Simon,

Just a thought, depending on your location and international settings of
your system, the ',' in the formula could be need to replace with ';'

"Simon" wrote:

I'm trying to use field codes, and distilled down to a test case with a
formula embedded in the first IF expression:

{IF {=AND(12,13)} = 1 "OK" "BAD"}

Looks simple enough - but I can't get this to display 'OK' - even when I
update the field. I did see it work - but now it's gone again. Seems utterly
unreliable. Is this a bug and is there a fix?

  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Using AND in a field code

Hi Simon,

Delete the space before the '=' sign.

So, instead of:
{IF {=AND(12,13)} = 1 "OK" "BAD"}
use:
{IF {=AND(12,13)}= 1 "OK" "BAD"}

Note too that both sets of field brace pairs (ie '{ }') for the field code are created via Ctrl-F9 - you can't simply type them or
copy & paste them from this message.

For more information on doing this and a wide range of other calculations in Word, check out my Word Field Maths 'tutorial', at:
http://www.wopr.com/cgi-bin/w3t/show...?Number=365442
or
http://www.gmayor.com/downloads.htm#Third_party

--
Cheers
macropod
[MVP - Microsoft Word]


"Simon" wrote in message ...
I'm trying to use field codes, and distilled down to a test case with a
formula embedded in the first IF expression:

{IF {=AND(12,13)} = 1 "OK" "BAD"}

Looks simple enough - but I can't get this to display 'OK' - even when I
update the field. I did see it work - but now it's gone again. Seems utterly
unreliable. Is this a bug and is there a fix?


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
Zip Code field returns 00000 when nothing in field in from xls Kim Mailmerge 2 October 3rd 07 02:30 PM
Field code being displayed and not the field Ted Hill Microsoft Word Help 1 May 4th 06 09:01 PM
Using VBA code w/i Field zSplash Mailmerge 5 January 23rd 06 10:18 PM
Word 2003 Field code within a field code Cheryl Mailmerge 2 November 25th 05 09:31 AM
Field Code wanda New Users 1 March 24th 05 05:26 AM


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