Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Field swallows my characters | New Users | |||
Enter text in a field and have it appear as entered elsewhere | Microsoft Word Help | |||
Help on Mailmerge field (field length) - field getting truncated | Mailmerge | |||
Help on Mailmerge field | Mailmerge | |||
Macro to Find/Replace (with MailMerge Field)? | Mailmerge |