Blank Fields in Word 2007 Merge

P

Promo

Hi there,

When merging data from Excel 2007 into a document in Word 2007, some of the
fields are blank,... I want to remove the blanks and move the rest of the
info up.
I am doing addresses and sopme addresses are over 4 lines and others over
5,... we don't want a space if there is no data in line 4 (for example)
Help..... Thanks
 
D

Doug Robbins - Word MVP

You need to use an If...then...Else field construction

{ IF { MERGEFIELD mergefieldthatmightbeblank } <> "" "{ MERGEFIELD
mergefieldthatmightbeblank }¶
{ MERGEFIELD mergefieldthatcomesaftermergefieldthat mightbeblank }" "{
MERGEFIELD mergefieldthatcomesaftermergefieldthat mightbeblank }" }

You must use Ctrl+F9 to insert each pair of field delimiters { } and where ¶
appears in the above, press the Enter key. Use Alt+F9 to toggle off the
display of the 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