Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
PK Laird PK Laird is offline
external usenet poster
 
Posts: 1
Default If...Then...Else MAILMERGE field not inserting correctly

I'm trying to use the Insert Word Field If...Then...Else function to display
certain text when the data field contains a certain value. However, when I
insert the function into the document, the field name becomes the numeral
"3." Consequently, it displays that text only where I have asked it to do so
if the value of the record is 3, because the field code reads { IF 3 = 3
"(true text)" "(false text)" }. How do I get it to compare the true value to
the value of the merge field I choose?
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default If...Then...Else MAILMERGE field not inserting correctly

I haven't quite grasped what the problem is, but I suggest you
a. enable the mail merge toolbar if you are using Word 2002/2003
(Tools|Customize)
b. enter the fields by hand:
- use ctrl-F9 to insert each pair of the special field braces {}
- type everything else
- use alt-F9 to toggle between "code view" and "results" view and the
button on the toolbar to toggle between "field names" view and "preview"
view

Your nested field should look something like

{ IF { MERGEFIELD myfieldname } = 3 "(true text}" "(false text)" }

However, in some cases you may find the following is needed:

{ IF { MERGEFIELD myfieldname } = "3" "(true text}" "(false text)" }

Peter Jamieson
"PK Laird" PK wrote in message
...
I'm trying to use the Insert Word Field If...Then...Else function to
display
certain text when the data field contains a certain value. However, when
I
insert the function into the document, the field name becomes the numeral
"3." Consequently, it displays that text only where I have asked it to do
so
if the value of the record is 3, because the field code reads { IF 3 = 3
"(true text)" "(false text)" }. How do I get it to compare the true value
to
the value of the merge field I choose?



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default If...Then...Else MAILMERGE field not inserting correctly

Toggle the field display (ALT+F9) and tell us what the field construction
really says.

It should look something like
{IF{Mergefield Fieldname} = "3" "True Text" "False Text"}
Is that what you expected? If not what exactly are you testing for?

What appears to be happing here is that you are displaying the field results
(toggle with the ABC button on the merge toolbar) and the value of the
current record is 3.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



PK Laird wrote:
I'm trying to use the Insert Word Field If...Then...Else function to
display certain text when the data field contains a certain value.
However, when I insert the function into the document, the field name
becomes the numeral "3." Consequently, it displays that text only
where I have asked it to do so if the value of the record is 3,
because the field code reads { IF 3 = 3 "(true text)" "(false text)"
}. How do I get it to compare the true value to the value of the
merge field I choose?



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 swallows my characters Ben Bullock New Users 8 March 21st 06 02:47 AM
Enter text in a field and have it appear as entered elsewhere Gregory Winters Microsoft Word Help 6 November 1st 05 02:09 AM
Help on Mailmerge field (field length) - field getting truncated Blasting Cap Mailmerge 0 September 16th 05 06:57 AM
Help on Mailmerge field Blasting Cap Mailmerge 0 September 16th 05 06:52 AM
Macro to Find/Replace (with MailMerge Field)? aiyou Mailmerge 1 December 8th 04 07:39 AM


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