View Single Post
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How to write {} statments with IF MAILMERGE?

I suspect what Doug meant was

{ Mergefield "Item1" }{ IF { Mergefield "Item2" } "" "[Enter]
{ Mergefield "Item2" }" }{ IF{ Mergefield "Item3" } "" "[Enter]
{ Mergefield "Item3" }" }

It is easy to lose an odd bracket when typing field structures.

The structure is essentially

{ IF{ Mergefield "Item3" } "" "[Enter]
{ Mergefield "Item3" }" }

The double quotes for a nul entry are superfluous but you can include them
if you like

{ IF{ Mergefield "Item3" } "" "[Enter]
{ Mergefield "Item3" }" "" }

--

Graham Mayor - Word MVP

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


lbmmoh wrote:
Thanks Doug,

I meant to say that my field should say:

{MERGEFIELD "Item1"}{IF {MERGEFIELD "Item1"} " " ----those
quotes should have no space, but I noticed that this site deletes it
if I dont put a space there..

What I dont get is that there are 5 brackets, but each time you hit
ctrl+F9 , you get 2 brackets. So I dont undersatnd the procedure in
building the statement itself. I already have a past Word doc that
was used with all the fields, so I think the Access will be my backup
plan.