Reply
 
Thread Tools Display Modes
  #1   Report Post  
Jarrett Jarrett is offline
Junior Member
 
Posts: 3
Question Word Labels, No Paragraph Break if Field is Empty

I have been trying to create some labels and some of my fields are empty.

The fields that may be empty a Address_2 ; Address_3 ; Address_4 and County

This is what my default MailMerge looks like at the moment:

«Title» «Last_Name»
«Company»
«Address_1»
«Address_2»
«Address_3»
«Address_4»
«Town» «Postal_Code»
«County»
«Country»


PROBLEM:
If any of the fields are empty, they will leave a space underneath.

Is there any way, maybe with IF conditions or any easier way, to tell Word to Skip to the Next Field if that one is empty?

I've been looking on the internet for some time and I have not been able to find a solution, any help would be much appreciated!
  #2   Report Post  
Jarrett Jarrett is offline
Junior Member
 
Posts: 3
Default

So considering that I am on a Mac and those commands as far as I know do not work here, but I will try tomorrow from a Windows, to achieve the following without paragraph breaks if the field is empty:

Company
Address_1
Address_2
Address_3
Town Post Code
County
Country

Is the following correct?

{ Mergefield Company }¶
{ Mergefield Address_1 }{If { Mergefield Address_2 } "" " ¶
{ Mergefield Address_2 }"}{If { Mergefield Address_3 } "" " ¶
{ Mergefield Address_3 }"}¶
{ Town } { Post Code }¶
{If { County } "" " ¶
{ Mergefield County }"}¶
{Country}


Please note that ¶ is where I pressed Enter or Shift + Enter.
  #3   Report Post  
Jarrett Jarrett is offline
Junior Member
 
Posts: 3
Smile

I managed to do it eventually!

I realised that it is of paramount importance to press Enter and not Shift+Enter to start a new line (¶), otherwise Word will always leave a gap between the two lines, even if your formula is correct.

So this is the formula:

{ MERGEFIELD Company }¶
{ MERGEFIELD Address_1 }{If { MERGEFIELD Address_1 } = "" "" " " }¶
{ MERGEFIELD Address_2 }{If { MERGEFIELD Address_2 } = "" "" " " }¶
{ MERGEFIELD Address_3 }{If { MERGEFIELD Address_3 } = "" "" " " }¶
{ MERGEFIELD Address_4 }{If { MERGEFIELD Address_4 } = "" "" " " }¶
{ MERGEFIELD Post Code } { MERGEFIELD Town }¶
{ MERGEFIELD County }{If { MERGEFIELD County } = "" "" " " }¶
{ MERGEFIELD County }¶

I found the right formula by reading this very useful guide:

https://wordmvp.com/FAQs/MailMerge/MMergeIfFields.htm
  #4   Report Post  
Nayna Nayna is offline
Banned
 
Posts: 3
Default

Quote:
Originally Posted by Jarrett View Post
I managed to do it eventually!

I realised that it is of paramount importance to press Enter and not Shift+Enter to start a new line (¶), otherwise Word will always leave a gap between the two lines, even if your formula is correct.

So this is the formula:

{ MERGEFIELD Company }¶
{ MERGEFIELD Address_1 }{If { MERGEFIELD Address_1 } = "" "" " " }¶
{ MERGEFIELD Address_2 }{If { MERGEFIELD Address_2 } = "" "" " " }¶
{ MERGEFIELD Address_3 }{If { MERGEFIELD Address_3 } = "" "" " " }¶
{ MERGEFIELD Address_4 }{If { MERGEFIELD Address_4 } = "" "" " " }¶
{ MERGEFIELD Post Code } { MERGEFIELD Town }¶
{ MERGEFIELD County }{If { MERGEFIELD County } = "" "" " " }¶
{ MERGEFIELD County }¶

I found the right formula by reading this very useful guide:

https://wordmvp.com/FAQs/MailMerge/MMergeIfFields.htm

I too had same problem. Thanks for this valuable information.
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
Empty page after column break LisaK Page Layout 1 July 14th 09 05:49 PM
Need Macro to remove empty paragraph marks. ISay Microsoft Word Help 6 August 4th 08 05:38 PM
using word 2007 suppress blank line when merge field is empty Shelly Mailmerge 1 June 16th 08 08:18 PM
In Word 2003 when mail merge how do I delete an empty field? connie Mailmerge 3 July 23rd 07 05:25 PM
differentiate a line break from a paragraph break Jorge Microsoft Word Help 1 October 3rd 05 07:46 PM


All times are GMT +1. The time now is 08:21 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"