Microsoft Office Word Forum - WordBanter

Microsoft Office Word Forum - WordBanter (http://www.wordbanter.com/index.php)
-   Mailmerge (http://www.wordbanter.com/forumdisplay.php?f=6)
-   -   Word Labels, No Paragraph Break if Field is Empty (http://www.wordbanter.com/showthread.php?t=156778)

Jarrett May 21st 18 06:49 PM

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!

Jarrett May 21st 18 08:43 PM

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.

Jarrett May 23rd 18 11:06 PM

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

ducklife February 13th 19 05:28 AM

I am also having trouble figuring out. I look forward to receiving the appropriate answer. Thank you.
Temple run

Nayna April 13th 19 07:32 AM

Quote:

Originally Posted by Jarrett (Post 497305)
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.


All times are GMT +1. The time now is 04:36 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
WordBanter.com