Solved

Mail Merge With Word

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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…
This article describes how to use the Send to Mail Recipient command. The instructions apply generally to Office 2007 and later versions, but Microsoft® Word 2013 was used for the specific steps and figures.  What is Send to Mail Recipient? Send…
This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

746 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

14 Experts available now in Live!

Get 1:1 Help Now