|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Creating a merge template with between 1 and 4 variables built into a rule
Hello,
I am working on a template and need to know how to add multiple merge fields to a sentence without causing a bunch of extra commas and periods if only 1 of the fields gets filled. We are sending letters as reminders to pay bills, and each person will have between 1 and 4 bills that need to be listed. If I add all 4 of the merge fields to the sentence in the template, the spacing, commas, and "and" get left at the end of the sentence (if they have fewer than 4 bills) How can I make a rule to prevent this conjunction and punctuation pileup? Thank you |
#2
|
||||
|
||||
This is called concatenation and requires nested fields using If fields. See Making your mail merge “intelligent” by using IF fields for an example.
Depending on where you are getting your source data for the merge (eg Microsoft Access), it may be simpler to build a SQL query there which uses the CONCAT function to do the tricky stuff so that the Word Mail Merge simply grabs that result. Threads like the following might give you clues (or keywords you can search further on). Concatenate fields and insert comma between: how to handle nulls – SQLServerCentral Forums
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Resetting the Normal Template - Getting default built-in styles - do not show up in the Organizer | herosz | Word | 2 | 03-16-2022 01:14 PM |
Creating Template - Macro/Mail Merge/VBA? | mwilburn01 | Word | 3 | 09-13-2018 05:24 AM |
Mail Merge in Word: creating a rule for blanks | cgranada | Mail Merge | 6 | 02-27-2017 09:08 AM |
Creating new documents from a mail merge template | pnjcarter | Mail Merge | 1 | 02-03-2014 06:42 PM |
How to access all built-in styles for a template? | ChrisBrewster | Word | 1 | 01-23-2014 07:00 PM |