Reply
 
Thread Tools Display Modes
  #1   Report Post  
Bart Paden
 
Posts: n/a
Default IF MERGEFIELD is not working...

I am trying to use an if statement to put "and" between two fields as long
as the 2nd field is NOT BLANK. The first field is called firstname and the
second field is called secondname. Word recommends I use the following
code:

{ IF { MERGEFIELD secondname } "" "and" "" }

After manipulating it about 100 different ways and having it still not work
I'm completely frustrated. If there is anyone out there that has an idea of
what I am doing wrong I would really appreciate the assistance.

Thanks
B

  #2   Report Post  
Graham Mayor
 
Posts: n/a
Default

Field boundaries {} are inserted with CTRL+F9. The construction you want is

{Mergefield firstname} {IF {Mergefield Secondname} "" "and {Mergefield
Secondname}"}

What you posted should also have worked if you inserted the fields
correctly.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Bart Paden wrote:
I am trying to use an if statement to put "and" between two fields as
long as the 2nd field is NOT BLANK. The first field is called
firstname and the second field is called secondname. Word recommends
I use the following code:

{ IF { MERGEFIELD secondname } "" "and" "" }

After manipulating it about 100 different ways and having it still
not work I'm completely frustrated. If there is anyone out there
that has an idea of what I am doing wrong I would really appreciate
the assistance.

Thanks
B



  #3   Report Post  
Bart Paden
 
Posts: n/a
Default

Graham

Thanks for the help. With a couple tweaks your suggestion worked
brilliantly!

Bart


On 9/13/05 10:59 PM, in article ,
"Graham Mayor" wrote:

Field boundaries {} are inserted with CTRL+F9. The construction you want is

{Mergefield firstname} {IF {Mergefield Secondname} "" "and {Mergefield
Secondname}"}

What you posted should also have worked if you inserted the fields
correctly.


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
IF field condition is not working Kris Mailmerge 1 June 9th 05 08:47 PM
CPU Usage When Working with Templates you created KM1 Microsoft Word Help 3 May 21st 05 11:57 PM
Imbedded MERGEFIELD in IF/ELSE/THEN field Rich Mailmerge 2 April 19th 05 01:14 PM
How do I do a conditional mail merge into a table tomtraff Mailmerge 5 March 29th 05 05:29 PM
Math In Merge Field(s) Kenny G Mailmerge 3 March 7th 05 06:57 PM


All times are GMT +1. The time now is 06:28 PM.

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"