How do I suppress printing a line if there's no data to merge?

J

Judy H/BGSU

If there is no data in the data source for a merge field in the main
document, how do I suppress that line from printing?
 
D

Doug Robbins - Word MVP

Use an If...then...Else field construction.

{ IF { MERGEFIELD maybeemptyfield } = "" "{ MERGEFIELD nextmergefield }"
"{ MERGEFIELD maybeemptyfield }x
{ MERGEFIELD nextmergefield }" }

Where x is a linefeed or carriage return (Shift+Enter or Enter)

Use Ctrl+F9 to insert each pair of field delimiters {} and Alt+F9 to toggle
the display of field codes

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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