![]() |
#1
|
|||
|
|||
![]()
Hello,
Please see below. I have two lines with two merge fields in the middle which are linked on my excel to two column. The goal is, if one of the columns are empty in excel, merge needs to delete that line completely with all sentence without a line break on the text. I tried to use /b trick on the mergefield code but it didnt worked. Anyone with any idea how to do ? I attached my both excel and word files. Heading You are «Age1» years old. You are «Age2»years old. Text text text Text text Goal : Heading You are 12 years old. Text text text Text text Thanks a lot |
#2
|
||||
|
||||
![]()
See Mailmerge Empty Line Suppression in the Mailmerge Tips and Tricks 'Sticky' thread at the top of this forum:
https://www.msofficeforums.com/mail-...ps-tricks.html You can use the \b and \f switches together.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]() Quote:
Is it because i have text-merge field-text, is that mixing the mentioned logic on the guide? |
#4
|
||||
|
||||
![]()
For example:
Heading¶ {MERGEFIELD Age1 \b "You are " \f " years old.¶ "}{MERGEFIELD Age2 \b "You are " \f " years old.¶ "}Text text text¶ Text text¶
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
WordMonkey1 | Mail Merge | 2 | 10-28-2020 12:25 AM |
![]() |
Yarikh | Mail Merge | 4 | 09-23-2018 12:17 AM |
![]() |
ljg713 | Word VBA | 1 | 12-21-2015 04:27 PM |
Delete paragraph base on merge field | BenEWill | Mail Merge | 1 | 07-02-2014 02:52 PM |
Mail Merge Empty Data Field | Licos101 | Mail Merge | 2 | 04-10-2014 06:19 AM |