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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pancomp60Information Systems ManagerAuthor Commented:
Apologies, here is the example
sample-Document.pdf
0
Rgonzo1971Commented:
Hi,

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

Open in new window

Regards
0
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.
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

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>.
0
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.
0
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.
0
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.
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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).
0
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.