#1
|
|||
|
|||
Suppress blank lines with IF THEN ELSE
Hello. I have the following if then statement with a mail merge and I can not figure out how to suppress the blank lines when the result is empty in the merge file. I have tried \b and entering ¶, but I still get blank spaces when the result is empty . I have also tried other solutions on this forum and nothing works. Can someone help? Here are two of the 20 lines. If the value is empty, I want it to suppress the blank lines .
{IF{MERGEFIELD Bulletin Board }= "" "Furniture First Bulletin Board" ""} {IF {MERGEFIELD Man_Wah_Central_Bill}= "" "Man Wah Cheers Container Buys" ""} Thanks in advance! |
#2
|
||||
|
||||
Did you read the Mailmerge Tips & Tricks thread at the top of this forum? Your issue is addressed there.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Yes, I did read them and tried both options, but neither one works. i was hoping someone would be kind enough to just modify my string with the correction switch and tell me what I am doing wrong.
|
#4
|
||||
|
||||
Really? It's no more complicated than:
{IF{MERGEFIELD Bulletin Board }= "" "Furniture First Bulletin Board"}{IF{MERGEFIELD Man_Wah_Central_Bill}= "" "¶ Man Wah Cheers Container Buys"} where the ¶ is a real paragraph/line break.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
No, maybe I was not clear. What I am trying to get it to do is if the mergefield is blank, then list the text, but if the mergefield is not blank, I just want it to skip the record completely and not show and blank space.
So, if MERGEFIELD is not blank then "list text" if MERGEFIELD is not blank then skip record and go to the next one. |
#6
|
||||
|
||||
So did you actually try it? The field code representation I posted does exactly what you have described...
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
Yes, I did try it. Blank lines are still there.
|
#8
|
|||
|
|||
Hey! I got it! Thank you so so so much! You are a God!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Suppress blank line in mail merge | BernieB | Mail Merge | 8 | 03-07-2022 02:17 PM |
Suppress blank lines | Khalil | Mail Merge | 4 | 09-13-2020 10:41 PM |
Suppress blank lines in mailmerge of excel reports into word document | beefcake2000 | Mail Merge | 1 | 11-10-2017 12:54 PM |
Suppress Header/Footer on Blank Pages in Book | SQLUSA | Word | 5 | 08-19-2012 03:51 PM |
How to turn all blank lines into non-blank for legal forms | sieler | Word | 3 | 04-12-2009 01:38 PM |