While you might get by using mailmerge to do this, you should really
consider using an Access report.
However, the If...then...Else field construction with Mergefields would be
{ Mergefield "Item1" }{ IF { Mergefield "Item2" } <> "" [Enter]
{ Mergefield "Item2" }{ IF { Mergefield "Item3" } <> "" [Enter]
{ Mergefield "Item3" } "" } "" }
Where the [Enter] appears above, you need to press the Enter key at that
point when constructing the field code

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Im a newb here, and trying to write a mailmerge that pulls data from an
> excel file.
[quoted text clipped - 33 lines]
>
> Thanks!
lbmmoh - 29 Feb 2008 13:21 GMT
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.

Signature
lbmmoh
Graham Mayor - 29 Feb 2008 14:38 GMT
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" }" "" }

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Thanks Doug,
>
[quoted text clipped - 9 lines]
> was used with all the fields, so I think the Access will be my backup
> plan.
lbmmoh - 29 Feb 2008 19:44 GMT
thanks again. I am able to write the same line as you but when I preview
the merge, i still have the blank spaces. THe total still shows in the
same place regardless of how many items are purchased. So situations
"a" and "b" have the same format after the merge, but I want the
spacing gone:
a)
item1
item2
Total $
b)
item1
Total $
Its that gap in situation "b" that im trying to get rid of

Signature
lbmmoh
lbmmoh - 29 Feb 2008 20:57 GMT
to follow up, ive ultimately trying to create a 3 column mail merge, and
I thought I could do it with zero border tables, but now that I think
about it, that would still force the structure of the mailmered
document, because the table rows would always be there even if there
was no field in a particular mergefield. Thus creating those gaps that
Im trying to remove. I want the total to get sucked up to the last item
found I attached a picture
[image:
http://images34.fotki.com/v1143/photos/1/162712/584397/mailmerge_example-vi.gif]

Signature
lbmmoh
lbmmoh - 01 Mar 2008 00:02 GMT
nevermind, I think I got a solution, thank you all

Signature
lbmmoh