Conditionally Replacing one Field w/ Another

R

Rob

Hi,

I was hoping someone could help me out with a mailmerge
issue from Outlook XP to Word XP.

I'm trying to make a conditional situation where the
merge uses the <<NickName>> field for my greeting line
(i.e. Dear Bob) only if the there is data in the
<<NickName>> field, otherwise pull data from the
<<FirstName>> field.

Example: Merge reads "Dear Bob" if "Bob" is entered in
the <<Nickname>> field, otherwise the merge read "Dear
Robert", from the <<FirstName>> field.

I tried using the "Insert Word Merge Fields" button and
the "If...then...else" option. But this only allows you
to subsitute a string of text if the field you're
refering to meets a particular condition.

I was trying to create a condition where if the
<<Nickname>> field was empty, the pull data from the
<<FirstName>> field.

The "Insert Word Merge Filds" process does not however
allow you to point to another merge field if your first
condition is not met.

Any help would be much appreciated.

Thanks,
Rob
 
D

Doug Robbins

After inserting the If..Then..Else field with strings of text, use Alt+F9 to
toggle on the field codes and replace the text strings with the mergefields
that you want to appear.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
R

Rob

Thanks. This worked great!

I actually tried this prior to posting my request, but I
didn't know I needed to use reveal codes (Alt-F9) in
order to insert the fields I want. That was key.

For those of you who want to try this, make sure your
syntax is correct. It took me a couple of try's to get
it right.

The condition I used with the "If...then...else" function
was "If the <<Nickname>> field is empty, then enter the
<<First_Name>> field, else <<Nickname>> field.

My final field looked like this:

{IF {MERGEFIELD Nickname}
= "" "{MERGEFIELD "First_Name"}" "{MERGEFIELD "Nickname"}"
}


Thanks again,
Rob
 

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