Remove blank lines

M

Mark Wallace

In another templete, there will sometimes be a "nil" result i.e
nothing in the database.

Is there a command in word which will ignore a line if all the results
of a mail merge on a line is nil, so I do not get balnk lines?
 
P

Peter Jamieson

Word does it by default, but the behaviour can be complicated, so if you
need better control you can use an IF field. Let's suppose you want the line
to be suppressed if fields field1, field2 and field3 are all empty. Then you
can use

{ IF "{ MERGEFIELD field1 }{ MERGEFIELD field2 }{ MERGEFIELD field3 }" = ""
""
"put your text and fields here with a paragraph mark at the end
" }then put your next line here immediately after the closing field brace

Peter Jamieson
 

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