Nested Merge field saves as merged with first record in excel

J

jenkusi

I am trying to merge a Word document with an excel file where the excel file
has numbers 1,2,3 which I want changed to words when merged with the Word
Document. I am able to make the merge work but the merge fields always saves
as merged with the first record in the excel file even if I do not complete
the merge. How do I get Word to save with the merge fields remaining as
merge fields and not taking on the values of the first record in excel. The
merge field that I am using is the following:
{IF {MERGEFIELD "Demonstrates"}="3" "Exceeding Expectations" {IF {MERGEFIELD
"Demonstrates"}="2" "Meeting Expectations" {IF {MERGEFIELD
"Demonstrates"}="1" "Not Meeting Expectations" {MERGEFIELD "Demonstrates"}}}}
 
M

macropod

Hi jenkusi,

You could code your field as:
{={MERGEFIELD Demonstrates}-2 \# "E'x'ceeding;Not Meeting;Meeting"} Expectations
and avoid the IF test altogether.

If you want to use the IF test, try:
{IF{MERGEFIELD Demonstrates}= 3 "Exceeding" {IF{MERGEFIELD Demonstrates}= 2 "Meeting" "Not Meeting"}} Expectations

Note that in either case, you don't need to have ' Expectations' inside the field.

Cheers
 
J

jenkusi

I need to put the last Mergefield in because my data could contain things
other than 1,2,3. Do you have any idea how to get Word to save the
mergefields intact so that I can edit them without rewriting them? As I have
it now Word (2003) automatically inserts the value in the first record into
the merge field, the merge works fine but I can't go back and edit the
mergefield without retyping it.

macropod said:
Hi jenkusi,

You could code your field as:
{={MERGEFIELD Demonstrates}-2 \# "E'x'ceeding;Not Meeting;Meeting"} Expectations
and avoid the IF test altogether.

If you want to use the IF test, try:
{IF{MERGEFIELD Demonstrates}= 3 "Exceeding" {IF{MERGEFIELD Demonstrates}= 2 "Meeting" "Not Meeting"}} Expectations

Note that in either case, you don't need to have ' Expectations' inside the field.

Cheers

--
macropod
[MVP - Microsoft Word]
-------------------------

jenkusi said:
I am trying to merge a Word document with an excel file where the excel file
has numbers 1,2,3 which I want changed to words when merged with the Word
Document. I am able to make the merge work but the merge fields always saves
as merged with the first record in the excel file even if I do not complete
the merge. How do I get Word to save with the merge fields remaining as
merge fields and not taking on the values of the first record in excel. The
merge field that I am using is the following:
{IF {MERGEFIELD "Demonstrates"}="3" "Exceeding Expectations" {IF {MERGEFIELD
"Demonstrates"}="2" "Meeting Expectations" {IF {MERGEFIELD
"Demonstrates"}="1" "Not Meeting Expectations" {MERGEFIELD "Demonstrates"}}}}
 
M

macropod

Hi jenkusi,

In that case, you'll do bets with a set of IF fields. Try:
{IF{MERGEFIELD Demonstrates}= 3 "Exceeding Expectations" {IF{MERGEFIELD Demonstrates}= 2 "Meeting Expectations" {IF{MERGEFIELD
Demonstrates}= 1 "Not Meeting Expectations" {MERGEFIELD Demonstrates}}}}

Perhaps the easiest way to create the set is to:
.. insert your 'Demonstrates' mergefield four times, as in «Demonstrates» «Demonstrates» «Demonstrates» «Demonstrates»
.. select the last two of these and press Ctrl-F9 to embed them in a formula field, then repeat this with the last 3, then all four,
so that you end up with:
{«Demonstrates» {«Demonstrates» {«Demonstrates» «Demonstrates»}}}
.. type the formulae and required results between the field braces and chevrons, so that you end up with
{IF«Demonstrates»= 3 "Exceeding Expectations" {IF«Demonstrates»= 2 "Meeting Expectations" {IF«Demonstrates»= 1 "Not Meeting
Expectations" «Demonstrates»}}}

Be careful to insert all of the spaces and double quotes shown, otherwise the fields won't work correctly.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

jenkusi said:
I need to put the last Mergefield in because my data could contain things
other than 1,2,3. Do you have any idea how to get Word to save the
mergefields intact so that I can edit them without rewriting them? As I have
it now Word (2003) automatically inserts the value in the first record into
the merge field, the merge works fine but I can't go back and edit the
mergefield without retyping it.

macropod said:
Hi jenkusi,

You could code your field as:
{={MERGEFIELD Demonstrates}-2 \# "E'x'ceeding;Not Meeting;Meeting"} Expectations
and avoid the IF test altogether.

If you want to use the IF test, try:
{IF{MERGEFIELD Demonstrates}= 3 "Exceeding" {IF{MERGEFIELD Demonstrates}= 2 "Meeting" "Not Meeting"}} Expectations

Note that in either case, you don't need to have ' Expectations' inside the field.

Cheers

--
macropod
[MVP - Microsoft Word]
-------------------------

jenkusi said:
I am trying to merge a Word document with an excel file where the excel file
has numbers 1,2,3 which I want changed to words when merged with the Word
Document. I am able to make the merge work but the merge fields always saves
as merged with the first record in the excel file even if I do not complete
the merge. How do I get Word to save with the merge fields remaining as
merge fields and not taking on the values of the first record in excel. The
merge field that I am using is the following:
{IF {MERGEFIELD "Demonstrates"}="3" "Exceeding Expectations" {IF {MERGEFIELD
"Demonstrates"}="2" "Meeting Expectations" {IF {MERGEFIELD
"Demonstrates"}="1" "Not Meeting Expectations" {MERGEFIELD "Demonstrates"}}}}
 

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