Mail merging using multiple existing documents

L

LizLucero

I’m trying to create a mail merge that will merge with different letters
depending on the code that is in the field named “LETTERCODE”. I have
48 different letters and a database of 10,000 names. I would like to be
able to do this automatically and not have to choose which names get
which letter manually.

I am using MS Word 2002 on Windows 2000. My database is a Progress csv
file that can be converted to Excel 2002.

I found this code in the MS Word Help files under “If Statement”. I
don’t know how to write the actual code that would do 48 if – then –
else statements.
{ IF { MERGEFIELD LETTERCODE } = "1" "{ INCLUDETEXT
G:\\worddocs\\contract.doc }"
{ IF { MERGEFIELD LETTERCODE } = "2" "{ INCLUDETEXT
G:\\worddocs\\contract2.doc }"
{ IF { MERGEFIELD LETTERCODE } = "3" "{ INCLUDETEXT
G:\\worddocs\\contract3.doc }"

I would like to have the exact code to accomplish this via a mail merge
or a macro that I could run.
 
C

Cindy M -WordMVP-

Hi LizLucero,

I understand the result that you want. I'm just not certain I understand
what it is you want from us :) You want VBA code to generate 48
individual, nested IF statements? Or just the easiest way to get these 48
statements into a main merge document?
I’m trying to create a mail merge that will merge with different letters
depending on the code that is in the field named “LETTERCODE”. I have
48 different letters and a database of 10,000 names. I would like to be
able to do this automatically and not have to choose which names get
which letter manually.

I am using MS Word 2002 on Windows 2000. My database is a Progress csv
file that can be converted to Excel 2002.

I found this code in the MS Word Help files under “If Statement”. I
don’t know how to write the actual code that would do 48 if – then –
else statements.
{ IF { MERGEFIELD LETTERCODE } = "1" "{ INCLUDETEXT
G:\\worddocs\\contract.doc }"
{ IF { MERGEFIELD LETTERCODE } = "2" "{ INCLUDETEXT
G:\\worddocs\\contract2.doc }"
{ IF { MERGEFIELD LETTERCODE } = "3" "{ INCLUDETEXT
G:\\worddocs\\contract3.doc }"

I would like to have the exact code to accomplish this via a mail merge
or a macro that I could run.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top