Solved

Mail Merge With Word

Posted on 2014-01-09
4
514 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Introduction Authors who set out to write any sort of lengthy piece for online submission—be it a long question or comment on a technical form, an article, or a substantial blog entry—often find it useful to work up a draft in an editor other t…
This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
This video walks the viewer through the process of creating an MLA formatted document, as well as a bibliography with citations.
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:
Suggested Courses

752 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