![]() |
#1
|
|||
|
|||
![]()
This is my "code":
( if (MERGEFIELD Chicken) = "0" "" "1") however, if it is indeed 0.. an empty line is created.. I want to delete the line automatically... help? |
#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
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
It doesn't work the b/ or f/ trick. Let me rephrase, maybe I'm doing a mistake.
Basically I am using a If MergeField. ( If ( MERGEFIELD VRedAge1 ) = "0" "MERGEFIELD VRedAge1 \b " ")" "Benefit Reduction" ) Is that how it should be written? It seems not to work. Basically, when VRedAge1 = 0, I want it to delete the line. If it is not 0, I want it to insert Benefit Reduction. Thank you in advance |
#4
|
|||
|
|||
![]()
I also tried
( If ( MERGEFIELD VRedAge1 ) = "" "MERGEFIELD VRedAge1 \b " ")" "Benefit Reduction" ) and when I merge.. there's an empty line.. help me ![]() |
#5
|
||||
|
||||
![]()
You really should pay attention to what the instructions in the link say to do. You need a field coded as:
{IF{MERGEFIELD Chicken}<> "0" "1¶ "} where ¶ is a real paragraph break or line break.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
![]()
Please go to the following link:
https://i.imgur.com/RAicsh1.png when RedAge1 is indeed 0, it creates an empty line.. I tried your trick it doesn't work..? also even if I type it {IF{MERGEFIELD Redage1}<> "0" "Reduction de la prestation¶ "} in 2 lines like you instead of 3 in my screenshot.. there's still an empty line! I read your thread indeed and I couldn't get it.. Could you help me figure it out? |
#7
|
||||
|
||||
![]()
You said you wanted to delete an empty line - not a table row. The two are entirely different and you cannot delete a table row that way. What you would need is two versions of the table (one with all rows, one without the variable one) inside an IF field that tests your Redage1 content.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#8
|
|||
|
|||
![]()
Im so sorry lol didnt know it was specifically a table row. So it would be something like this:
If Redage1 is 0, "show table row without Reduction de la prestation table row", "show table with Reducation de la prestation". However, I have an issue. I have to test like redage1 until redage10. do I need to do 11 tables (1 table with no reduction, 10 tables (one reduction, 2 reduction, 3 reduction,... 10 reductions) ? ![]() Any faster way to get it done? |
#9
|
||||
|
||||
![]()
The '¤'symbols in your screenshot indicate a table's end-of-cell or end-of-row marker.
Quote:
{IF{MERGEFIELD Redage1}<> "0" "Text for Redage1¶ "}{IF{MERGEFIELD Redage2}<> "0" "Text for Redage2¶ "}{IF{MERGEFIELD Redage3}<> "0" "Text for Redage3¶ "}¤ Otherwise, you could split your table so that each variable row is a separate table. {IF{MERGEFIELD Redage1}<> "0" "¶ Table for Redage1¤ "}{IF{MERGEFIELD Redage2}<> "0" "¶ Table for Redage2¤ "}{IF{MERGEFIELD Redage3}<> "0" "¶ Table for Redage3¤ "} with the paragraph breaks preceding the tables made as small as possible (1pt).
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#10
|
|||
|
|||
![]()
Will it still work if the Text for RedAge1 is a mergefield?
![]() Man you're amazing, I gotta thank you a lot. |
#11
|
||||
|
||||
![]()
Yes, the conditional output can include mergefields, tables, pictures, etc.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#12
|
|||
|
|||
![]()
Could you stay online for 10 mins? I am currently logging by distance on my computer work.
![]() |
#13
|
|||
|
|||
![]()
http://oi67.tinypic.com/246pfls.jpg
Please look at my screenshot. Here's my issue. On the left part, where red arrow is pointed, only one sentence is supposed to be shown: Réduction de la prestation which means Benefit Reduction in english. On the right part, I show the benefit reductions (from 0 to 10). If there are 5 benefit reduction for 5 specific ages, then I need 5 rows on the right that say the reductions and 5 empty line "rows" that dissapear (because i have 10 mergefields on the right part that you see on the screenshot). Should I be doing 11 tables (one table that has no benefit reduction, the other 10 being a table with one reduction, a table with two reduction, etc...)? Could you confirm? Cause I have trouble understanding your post. |
#14
|
||||
|
||||
![]()
Instead of posting images on other sites, from where they're liable to disappear, then posting links here, please post them here, which you can do via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
If you want a table without any of the 'Reduction de la prestation' row to appear when {MERGEFIELD Redage1}= 0, then you'll still need to have at least two tables. It would also be much easier to help you if you attached the actual document to a post instead of screenshots...
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#15
|
|||
|
|||
![]()
I uploaded here and included the merge excel file.
I'm sorry lol, Im not familiar with this forums template yet! I'll be better. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Linking specific cells in Excel to function with MergeField? | Fabulist | Word | 0 | 02-17-2016 02:19 AM |
![]() |
nfotx | Mail Merge | 2 | 08-31-2015 09:25 PM |
Can you prevent an empty line from appearing in the first line of a page? | New Daddy | Word | 10 | 11-18-2013 07:01 AM |
![]() |
dexter30 | Word VBA | 2 | 08-05-2013 08:37 PM |
![]() |
widescreenforever | Word | 1 | 11-28-2012 02:49 PM |