Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / March 2005

Tip: Looking for answers? Try searching our database.

Using If statement in mailmerge document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
fig000 - 31 Mar 2005 17:04 GMT
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
Greg - 31 Mar 2005 17:33 GMT
Neil,

Your code works here.

Are both sets of field code braces entered with CTRL+F9?
fig000 - 31 Mar 2005 19:48 GMT
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

> Neil,
>
> Your code works here.
>
> Are both sets of field code braces entered with CTRL+F9?
Greg - 31 Mar 2005 21:29 GMT
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.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.