Using If statement in mailmerge document

F

fig000

Hi,

I'm new to Mailmerge. I've tried using an if. I don't know how to do
it correctly but I've tried to follow examples such as this that I got
off the newsgroups:

{IF{MERGEFIELD PRICE} > 50 "replace this" "less than 50"}

I've put this in a field with codes toggeled on and off and also I
tried putting it in a formula. Nothing seems to work; I get all kinds
of errors or I get the name of the field. This is an example of my not
knowing the right place to put something.

I'd appreciate any help.

Thanks,
Neil
 
F

fig000

Greg,

Thanks for answering. I'm not sure where the code goes in the gui
where you edit a field (codes visible or not). And I didn't use ctrl+
f9.

I guess one of the problems with not knowing about something is that
you have a hard time framing a questions :). What I'm trying to do is
create a field in a merge document. I insert a merge field from my
database. Then I edit that field. At first there's a field name field
for me to specify a field. Out of desperation I tried putting the code
with the curly brackets there but it doesn't work.

So I toggled field codes and put it in the resulting field codes
field. That didn't work either. Just to check I added the merge field
unchanged and ran the merge, just too see if it was reading the field
correclty. It was.

So, where do I put that code. And do I have to use control f9 to
enter the curly brackets?

Sorry to be such a newbie. Basically I'm a .net programmer and don't
deal with word as often as I should. It's often a lot faster to use
word to do certain things than to write a program.

Neil
 
G

Greg

Neil,

Type: $51.00 select it, Insert>Bookmark and name it: Price

Using CTRL+F9 to enter the field code pairs, enter the following field.

{IF {Price} > 50"Bingo""Raise the price"}

Select the field and toggle the display (right click and use the menu)

Now all you have to do is replace the REF field { Price } with your
mergefield Price.
 

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