![]() |
#1
|
|||
|
|||
![]()
Hi Everyone!
I have my mailmerge all figured out except one last part. If my very first IF is blank it inserts a blank line. So if MergeFiled M_29 is blank, then I get a blank line showing up. I have managed to get rid of all the other blank lines if any of the other fields are blank, just not the first one. This is my code: Mailmerge.jpg Any suggestions would be appreciated. Thanks. Karin |
#2
|
||||
|
||||
![]()
Use:
{IF{MERGEFIELD M29}<> "" "•→Ostomy Supplies¶ "}{IF{MERGEFIELD M30}<> "" "•→Incontinence Supplies¶ "}{IF{MERGEFIELD M31}<> "" "•→Catheter Supplies¶ "}{IF{MERGEFIELD M32}<> "" "•→Injection Supplies¶ "}{IF{MERGEFIELD M34}<> "" "•→Burn Scar Garments¶ "}{IF{MERGEFIELD M35}<> "" "•→Custom Made Compression Garments¶ "}{IF{MERGEFIELD M36}<> "" "•→Ready Made Compression Garments¶ "}{IF{MERGEFIELD M37}<> "" "•→Back and Abdominal/Inguinal Hernia Supports¶ "}{IF{MERGEFIELD M16A}<> "" "•→Pediatric Benchmark Equipment¶ "}{IF{MERGEFIELD M39}<> "" "•→Bathing and Toileting Aids (Small)¶ "}{IF{MERGEFIELD M39A}<> "" "•→Stationary Commodes¶ "}{IF{MERGEFIELD M40}<> "" "•→Walking Aids and Accessories¶ "}{IF{MERGEFIELD M42}<> "" "•→Bathing and Toileting Aids (Large)¶ "}{IF{MERGEFIELD M43}<> "" "•→Slings Benchmark¶ "}{IF{MERGEFIELD M58}<> "" "•→Mattress Overlays, Transfer Aids and Accessories¶ "} without a paragraph break following the last field. For a macro to convert the above field code representations into working field codes, see Convert Text Representations of Fields to Working Fields in the Mailmerge Tips and Tricks 'Tickiy' thread at the top of this forum: https://www.msofficeforums.com/mail-...ps-tricks.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Thank you Paul! I had the paragraph markers in the wrong spot.
The issue I am having now is the sentence following the IF structure. The items in the IF are indented. If I remove the paragraph marker after the last field, then the sentence after the IF structure is also indented. If I leave the paragraph marker in then the next sentence is not indented but I have a blank line. I don't want a blank line and I don't want the next line indented. Any ideas? |
#4
|
||||
|
||||
![]()
If you apply the indented paragraph formatting to each of the paragraph breaks within the field construction, but not to the paragraph following it, your sentence after the field shouldn't be indented. It may be easier to do that setup before deleting the paragraph break that follows the fields.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
![]()
That worked.
Thanks! |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
jamu | Word VBA | 9 | 04-11-2022 04:21 PM |
![]() |
Alex1s85 | Mail Merge | 4 | 01-18-2020 11:30 PM |
![]() |
yoyoauba | Mail Merge | 6 | 01-23-2019 07:53 AM |
![]() |
Formd | Mail Merge | 5 | 05-11-2018 03:43 PM |
![]() |
simpleonline1234 | Word VBA | 1 | 02-25-2011 02:28 AM |