Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
SamuelT SamuelT is offline
external usenet poster
 
Posts: 2
Default Creating Conditional Paragraph Breaks With Mail Merge

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

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
PeterHS PeterHS is offline
external usenet poster
 
Posts: 20
Default Creating Conditional Paragraph Breaks With Mail Merge

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




"SamuelT" wrote:

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

  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Creating Conditional Paragraph Breaks With Mail Merge

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

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



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
SamuelT SamuelT is offline
external usenet poster
 
Posts: 2
Default Creating Conditional Paragraph Breaks With Mail Merge

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

Very helpful - much obliged!!!

"Doug Robbins - Word MVP" wrote:

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

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




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Mail Merge pls Microsoft Word Help 2 September 25th 08 05:57 AM
email merge creating line breaks MB Mailmerge 1 September 13th 08 11:17 PM
Conditional mail merge from Contacts Terry Lemons Mailmerge 2 January 2nd 08 02:28 AM
Conditional Mail Merge Help Susan Ramlet Mailmerge 0 August 22nd 05 06:26 PM
Conditional mail merge Hanif Mailmerge 1 November 26th 04 08:10 PM


All times are GMT +1. The time now is 07:46 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"