Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Mail Merge With Word

Posted on 2014-01-09
4
Medium Priority
?
531 Views
Last Modified: 2014-01-16
Hi,

I have an excel spreadsheet

Column A is the section. There are 2 values for the section P and W. I want the names with section P to be one area and the names with section W in another.

I tried using some mail merge rules: Next Record If

Next Record If Not Blank and Section Equal To P

When I do this, it shows all of the records in the P section, not separated.
Word-Demo.docx
Excel-Demo.xlsx
Should-Look-Like.docx
0
Comment
Question by:Computer Guy
  • 3
4 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 39768432
You want to group the items according to your 'Section' column You are basically doing a one-to-many Mail Merge. That functionality is not built in to Word. However Microsoft suggest a way of doing it using a directory type of merge in this article: http://support.microsoft.com/kb/294686.

This is what the fields would look like in your case:

{ IF { MERGESEQ } = "1" "{ MERGEFIELD SECTION }¶
" "" }{ SET Place1 { MERGEFIELD SECTION }}¶
{ If { Place2 } <> { Place1 }"¶
{ MERGEFIELD SECTION }¶

{ MERGEFIELD FIRST } { MERGEFIELD LAST }" "{ MERGEFIELD FIRST } { MERGEFIELD LAST }" }{ SET Place2 { MERGEFIELD SECTION }}

There are other ways, mainly using VBA which I suggest in this question:
http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Word/Q_23658368.html
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 39768553
This is an update of what the fields would look like for your data.

{ IF { MERGESEQ } = "1" "Section { MERGEFIELD SECTION }"
 "" }{ SET Place1  { MERGEFIELD SECTION }}
{ If { Place2 } <> { Place1 }
"Section { MERGEFIELD SECTION }
{ MERGEFIELD FIRST } { MERGEFIELD LAST }" "{ MERGEFIELD FIRST } { MERGEFIELD LAST }" }{ SET Place2 { MERGEFIELD SECTION }}

There is an article here that has some VBA code to convert the text simulation of the Word field code display (as above) to actual Word fields. You might find it useful here.
0
 
LVL 3

Author Comment

by:Computer Guy
ID: 39769297
Do you have any already put together solutions I can build off of?
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 2000 total points
ID: 39769915
This document contains the field complex as in my previous comment. You will have to reset the datasource as the path to my Excel file is different from yours.
Word-Demo1.docx
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question