MS Word 2000 Mail Merge question

H

homeontherange

Please forgive my ignorance regarding Mail Merge; I can see from the
posts that I've brought up searching for a solution, that I know
nothing about mail merge compared to most of you. I do have very
limited html code experience, so i understand the basics of tags and
syntax, etc.

My wife works for a non-profit organization that sends out a monthly
statement to summarize a participants service use. They were using a
very old Word for Mac mail merge document that was created for them
10+ years ago. They've had a system crash, the file's corrupt and it
won't work. I told them I'd try to help, as they don't have the funds
to just hire someone. I was able to create the Database and the Main
Document, and use the Insert Mail Merge to get the basic fields
working. Most statements will be sent to the actual particpant, so i
named the fields "participant1" and "participant2" for the first and
last names. However, some statements go to personal representatives
for the participants that can't care for themselves. The fields in
each row for the personal reps are "first name" and "last name". What
I want to do is format it so that if the "first name" and "last name"
tables have names in them, then there is a personal rep, and it
inserts their name. However, if the "first name" and "last name"
blocks are blank, it will insert the "participant1" and "participant2"
name. I've tried the Insert Word Field and tried using the IF
statement, but i don't understand the syntax or formatting that i
should be using.

Can anyone help? Thanks in advance!
 
P

Peter Jamieson

You need something like

{ IF "{ MERGEFIELD "first name" }{ MERGEFIELD "last name" }" = ""
"{ MERGEFIELD "participant1" } { MERGEFIELD "participant2" }"
"{ MERGEFIELD "first name" } { MERGEFIELD "last name" }" }

where all the {} are the special field braces you can insert (on Windows
Word) using ctrl-F9. Everything else can be typed as plain text. You can use
Alt-F9 to toggle between field codes and field preview/results view, and
select the fields and press F9 to update the result.


Peter Jamieson
 
H

home on the range

Thanks so much for the help. Other than the double quotes, are the
single quotes necessary? Also, can you tell me what switch the double
quotes are for?

Thanks again!
 
P

Peter Jamieson

I thought all the quotes in there were double quotes :)

You can certainly cut the thing down to:

{ IF "{ MERGEFIELD "first name" }{ MERGEFIELD "last name" }" = ""
"{ MERGEFIELD participant1 } { MERGEFIELD participant2 }"
"{ MERGEFIELD "first name" } { MERGEFIELD "last name" }" }

but you need the quotes around merge field names that have spaces in them,
you need the quotes around the two results, i.e.

"{ MERGEFIELD participant1 } { MERGEFIELD participant2 }"

and

"{ MERGEFIELD "first name" } { MERGEFIELD "last name" }"

partly because the results have spaces in them.

Personally I prefer to quote the comparands and results if they are strings
anyway.

Peter Jamieson
 

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