How can I modify a mail merge list in Word 2016

I have a Word 2016 Merge document that uses a merge field to pull names from a database and make a numbered list.  I would like to do one of two things; either add a short underline immediately after each name in the list or, under line each name with the underline extending to the right margin (see example)sample-Document.pdf
Pancomp60Information Systems ManagerAsked:
Who is Participating?
Pancomp60Information Systems ManagerAuthor Commented:
Brian B gave me a work-a-round idea.  What I've done is modified the template so the user can easily add the lines by placing the cursor to the right of the names that appear after the merge and pressing <TAB> twice. The first tab sets the start of the line, the second tab draws the line (set to leading underscore).  While not totally automated, this solves our problem for now.  Thank you all for sharing your thoughts and ideas.
Pancomp60Information Systems ManagerAuthor Commented:
Apologies, here is the example

You could try
{ MERGEFIELD List_of_Names}{ IF { MERGEFIELD List_of_Names} = "" ""  " / ______" }

Open in new window

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Rob HensonFinance AnalystCommented:
If you setup the document with a table, you can add a border to the bottom of the table cells. This then looks like it is underlined.
Pancomp60Information Systems ManagerAuthor Commented:
Unfortunately setting the field into a table puts all of the names in a top down list with an "underline" next to the last name in the list only.  I should also specify that the merge variable was created in the SQL program we use to track the information so it is not susceptible to a NEXT RECORD IF statement where you would build a table and put merge fields in each cell for a given number of cells.  This merge variable pulls each record and separates them with a <CR>.
Pancomp60Information Systems ManagerAuthor Commented:
{ MERGEFIELD List_of_Names}{ IF { MERGEFIELD List_of_Names} = "" ""  " / ______" } unfortunately gives me the same problem; the underline appears at the end of the list, so it shows up only besides the last name.

I will be getting with the developer of our SQL database app to see if their variable can be modified as I now believe that the problem lies in how they are pulling the data and formatting it with the variable.  Thank you all for your help thus far.
Brian BEE Topic Advisor, Independant Technology ProfessionalCommented:
I just tried this to be sure it worked...
Set a right align tab
Select the entire mergefield and undeline it.
Move one space to the right so you are right beside the paragraph mark.
Enable underline.
Hit Tab to jump over to the paragraph mark. The empty space should underline.
Brian BEE Topic Advisor, Independant Technology ProfessionalCommented:
Glad to hear you found an solution. Please be sure to mark the answers you thought were helpful and then pick which post was the solution. (I think in this case, the solution is your own answer).
Pancomp60Information Systems ManagerAuthor Commented:
The problem lies in the way our program was developed and its construction of this document merge variable.  This particular variable pulls a list of selected names and separates them by <CR>.  Thus all names are pulled into the document prior to any code or formatting being applied at the end of the merge statement so the underline appears next to the last name only.  Placing the variable in a cell in a table ends up putting all the names in a single cell so again, only the last name in the list appears to have an underline next to it.

After checking with the developer this amounts to the best option available in Word.  While not totally automated, it makes it easier for users to add an underline at the end of  each name, should they want it.

Bottom line, there is no known Word option that would work with this variable and produce the desired results.  Only other option I have, which I will pursue, is to write my own SQL variable within the constraints of the program.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.