Reply
 
Thread Tools Display Modes
  #1   Report Post  
fig000
 
Posts: n/a
Default Using If statement in mailmerge document

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

  #2   Report Post  
Greg
 
Posts: n/a
Default

Neil,

Your code works here.

Are both sets of field code braces entered with CTRL+F9?

  #3   Report Post  
fig000
 
Posts: n/a
Default

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?


  #4   Report Post  
Greg
 
Posts: n/a
Default

Neil,

Type: $51.00 select it, InsertBookmark 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.

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you save individual document pages as seperate word files? John Calligy Mailmerge 2 April 12th 05 09:14 AM
Document Map Question PosseJohn Page Layout 2 March 23rd 05 01:27 PM
Problems migrating Word 97 mailmerge document to Word 2003 [email protected] Mailmerge 2 January 18th 05 07:03 PM
Newbie document question please Dudley Henriques New Users 4 January 9th 05 08:38 PM
Document object in protected form Bruce Tables 2 December 6th 04 07:09 PM


All times are GMT +1. The time now is 10:32 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"