Hi Doug,
If the field is numeric, you can add a numeric picture switch. If it's text (or numeric), you can use field coding to apply an IF test.
In Word, to add a numeric picture switch to a mergefield: .. select the field; .. press Ctrl-F9 to reveal the field coding. It should look something like {MERGEFIELD MyData}; .. edit the field so that you get {MERGEFIELD MyData \# "0;-0;There is nothing to report"} where "There is nothing to report" is your alternative text; .. position the cursor anywhere in this field and press F9 to update it; .. run your mailmerge.
You can use up to 64 characters in a numeric picture switch - both x and X will need to be enclosed with single quotes.
In Word, to apply an IF test to a mergefield- .. duplicate the mailmerge field to be tested (eg «MyData») so that you get: «MyData»«MyData»; .. select both fields and Press Ctrl-F9, you'll get: { «MyData»«MyData» }; .. fill in between the braces so that you end up with: {IF«myData»= "" "There is nothing to report" «MyData»}, where "There is nothing to report" is your alternative text; .. position the cursor anywhere in this field and press F9 to update it; .. run your mailmerge.
-- Cheers macropod [MVP - Microsoft Word]
"DOUG GARDNER" <DOUG GARDNER[ at ]discussions.microsoft.com> wrote in message news:9647329F-A81F-4FCD-B7C5-5E93A95C66A5[ at ]microsoft.com...
[Quoted Text] >I HAVE A DOCUMENT THAT IS MERGED WITH A DATABASE. THERE ARE SOME FIELDS THAT > ARE BLANK IN THE DATABASE, BY DESIGN. HOW CAN I MODIFY THE MERGED FIELD IN A > FORM LETTER TO EITHER ADD A STANDARD TERM IF THE DATABASE IS BLANK OR ADD THE > DATABASE INFORMATION WHEN THE DATABASE FIELD IS POPULATED.
|