If Then Codes

J

Jose Cabral

I am using Word 2007. In a merge, I am trying to create a condition -- if
the word is VMRC write " Valley Mounte Regional Center" if is ALTA write
"Alta California Regional Center"

Problem: I try t edit the merge and the program doesn't give me any option.
I try to go to the merge field in the tool bar and this id off. What I am
doing wrong? Please advise.
 
D

Doug Robbins - Word MVP

Assuming that the "word" is coming from the data source, in the mail merge
main document press Alt+F9 to display the field codes and where the merge
field that returns the "word" is displayed you wil see { MERGEFIELD
"somefieldname" } where "somefieldname" is the actual name of the merge
field.

Now select that field construction and press Ctrl+F9 so that you get

{ { MERGEFIELD "somefieldname" } }

then modify that as follows

{ IF { MERGEFIELD "somefieldname" } = "VMRC" " Valley Mounte Regional
Center" "Alta California Regional Center" } }

Use Alt+F9 to toggle off the display of the field codes and then execute
your merge.


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
M

macropod

Hi Doug,

And in case it's neither ALTA nor VMRC:
{IF{MERGEFIELD Data}= "VMRC" "Valley Mounte Regional Center" {IF{MERGEFIELD Data}= "ALTA" "Alta California Regional Center"
{MERGEFIELD Data}}}
 

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