Solved

Mail Merge With Word

Posted on 2014-01-09
4
497 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

It is often necessary in this forum and others to illustrate Word fields as text with the field delimiters replaced with the curly brackets that the delimiters resemble when field codes are being displayed on the document. This means that the text c…
A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now