View Single Post
  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default Non Printing of blank fields

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

"Tony Williams" wrote in message
...
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
"Doug Robbins - Word MVP" wrote in message
...
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

"Tony Williams" wrote in message
...
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