Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Brenda A. Reid Brenda A. Reid is offline
external usenet poster
 
Posts: 8
Default Using Operators with Field Codes

I have a precedent which has:

{ set granteemf { fillin "Is the Grantee Male or Female? [type m or f]}}
{ set granteesp { fillin "Is the Grantee Singular or Plural [type s or p]}}

I would like to have an If statement combining the two, i.e.

If granteemf = f AND granteesp = s . . .

Can I do that?

Brenda




  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Using Operators with Field Codes

The safest general-purpose way for multiple questions is

{ IF "{ granteemf \*Upper }" = "F" "{ IF "{ grannteesp \*Upper }" = "S"
"both F and S" "M or P" }" "M or P" }

But you could also consider something like

{ IF "{ granteemf \*Upper }&{ grannteesp \*Upper }" = "F&S" "both F and S"
"M or P" }

(You need something in the middle of the two results because

{ IF "{ granteemf \*Upper }{ grannteesp \*Upper }" = "FS" "both F and S" "M
or P" }

would result in "both F and S" if the user responded FS to either the M/F
question or the S/P question and left the other one blank)

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Brenda A. Reid" wrote in message
...
I have a precedent which has:

{ set granteemf { fillin "Is the Grantee Male or Female? [type m or f]}}
{ set granteesp { fillin "Is the Grantee Singular or Plural [type s or
p]}}

I would like to have an If statement combining the two, i.e.

If granteemf = f AND granteesp = s . . .

Can I do that?

Brenda





  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Brenda A. Reid Brenda A. Reid is offline
external usenet poster
 
Posts: 8
Default Using Operators with Field Codes

This certainly did the trick. Am forever grateful . . . Thanks.
Brenda

"Peter Jamieson" wrote in message
...
The safest general-purpose way for multiple questions is

{ IF "{ granteemf \*Upper }" = "F" "{ IF "{ grannteesp \*Upper }" = "S"
"both F and S" "M or P" }" "M or P" }

But you could also consider something like

{ IF "{ granteemf \*Upper }&{ grannteesp \*Upper }" = "F&S" "both F and S"
"M or P" }

(You need something in the middle of the two results because

{ IF "{ granteemf \*Upper }{ grannteesp \*Upper }" = "FS" "both F and S"
"M or P" }

would result in "both F and S" if the user responded FS to either the M/F
question or the S/P question and left the other one blank)

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Brenda A. Reid" wrote in message
...
I have a precedent which has:

{ set granteemf { fillin "Is the Grantee Male or Female? [type m or f]}}
{ set granteesp { fillin "Is the Grantee Singular or Plural [type s or
p]}}

I would like to have an If statement combining the two, i.e.

If granteemf = f AND granteesp = s . . .

Can I do that?

Brenda







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
Field codes: MergeField field RTF format problem Amdious Mailmerge 4 September 17th 07 02:38 PM
Saving word document with field results not field codes Cambdoc Microsoft Word Help 2 July 14th 06 10:51 AM
Can string operators be used? Andy Chan Mailmerge 2 January 14th 06 01:32 PM
I can't see anything but codes or field codes...help!!!! Snfldlover Microsoft Word Help 3 April 20th 05 03:23 PM
I can't see anything but codes or field codes...help!!!! Snfldlover Microsoft Word Help 3 April 20th 05 02:48 PM


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