Non Printing of blank fields

T

Tony Williams

I am building a mail merge letter from an Access database query in Word. In
some records the company field is empty. How do I make sure the rest of the
address moves up a line so that I don't get an empty line. I'm using Word
XP, in previous versions of Word there was a tick box that handled blank
lines but I can't see it in XP. Can anyone help?
Tony
 
D

Doug Robbins - Word MVP

If you select Customize from the Tools menu and on the Commands tab of the
Customize dialog, select the All Commands category, and then scroll down
through the commands until you come to the Mail Merge Helper item, you can
then left-click and drag it onto a menu or the toolbar. This will enable
you to perform the merge in the same way as in previous versions of Word.

Alternatively, you can use an If...then...Else... construction to check for
the presence of data in the company field and return that field plus a
carriage return if there is some, and nothing if there is not. You would
then have the next mergefield on the same line in the document.

--
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
 
T

Tony Williams

Thanks Doug. How would I set up the If statement. I see I can edit the filed
properties and there is an If statement choice but how would I put in the
carriage return? This new version doesn't seem as user friendly as the old
W97, or is it me getting old?
Thanks
Tony
 
T

Tony Williams

Doug I've just had a look at the Mail Merge Helper. Am I right in thinking
that with XP the "Suppress blank lines when printing" is the default? I ask
this because when I clicked on the helper it was already there.
Thanks
Tony
 
P

Peter Jamieson

It is the default, but the behaviour of this option has changed in Word
2002/2003 because blank lines are no longer suppressed if the blank line
results from a blank field nested within another field such as IF or
INCLUDETEXT. (And if you're using ADDRESSBLOCK, I'd revert to using
individual fields)

Peter Jamieson

(and I don't think it will work anyway
 
P

Peter Jamieson

Just use Alt-F9 to display the underlying field codes, then you can use e.g.

{ IF "{ MERGEFIELD companyname }" = "" ""
"
{ MERGEFIELD companyname }" }

(That's laid out for clarity - in fact, only the extra paragraph mark or
return before the second{ MERGEFIELD } field is required, i.e. you can use

{ IF "{ MERGEFIELD companyname }" = "" "" "
{ MERGEFIELD companyname }" }

Peter Jamieson
 
T

Tony Williams

Thanks Peter
Tony
Peter Jamieson said:
It is the default, but the behaviour of this option has changed in Word
2002/2003 because blank lines are no longer suppressed if the blank line
results from a blank field nested within another field such as IF or
INCLUDETEXT. (And if you're using ADDRESSBLOCK, I'd revert to using
individual fields)

Peter Jamieson

(and I don't think it will work anyway
 

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