Creating Conditional Paragraph Breaks With Mail Merge

S

SamuelT

Hi all,

I'm putting together a mail merged document and am having a slight problem
when it comes to paragraph breaks.

Basically, a number of entrants need a few paragraphs on the letter. Getting
the text in is no problem at all (it's in the spreadsheet that is feeding the
merge). However, when a person who does not need the extra paragraphs in is
brought up Word leaves the paragraph breaks in, which leaves ugly big spaces
in between the information.

Can anyone suggest a means of adding paragraph breaks on the document,
without actually 'hard coding' it in the Word document. I'm thinking possibly
some code in the merge tags themselves.

Any help appreciated!

SamuelT
 
P

PeterHS

Hi Samuel,

When I understand you correctly you want tu use some fields wich can be
emty, between the fields are paragraph breaks and when the fields are empty
you get only paragraph breaks (gap)

When this is the case put every field in a if then else statement like: if
field = "" then "" else field + paragraphbreak. This wil put nothing in the
document when the field is empty, and when the field is not empty it puts in
the field with a paragraph break.

Put the if then else field in with "input fields" don't try to type all the
text it won't work. It is possible when you put the if then else field in to
change it (put tekst or field in the sections) I don't know how good you are
but you see en change the field code by chanching the document so you see the
code not the results you change this at options view or get the button for
changing view, it looks like {a}.

This solution wil also work when you have fields after each other en some
are sometimes empty. Puthing the filed and the space in the if then else
makes no double spaces in your document.

Hope this will help you

Succes

Peter
 
D

Doug Robbins - Word MVP

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

{ IF { MERGEFIELD fieldcontaining the text } <> "" "{ MERGEFIELD
fieldcontainingthetext }¶" "" }The next paragraph in your document.....

Where ¶ appears in the above construction, press the Enter key. You must
use Ctrl+F9 to insert each pair of the field delimiters.

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

SamuelT

Thanks Doug and Peter - got it working just as I wanted now.

Very helpful - much obliged!!!
 

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