HOW DO I SET UP A CONDITIONAL FORMAT TO A FIELD

D

DOUG GARDNER

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.
 
M

macropod

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top