Mailmerge for Excel Data

N

Night Owl

Will someone tell me, please, how I can suppress (or hide) fields in a Word
mailmerge document that have a value of 0 (Zero).

I'm using Office 2002 SP 3 on a Vista Premium desktop PC.

It's a bit naff sending a letter to someone with a 0 in a blank line in the
middle of their address!

I do need to use Excel for the data base.

Thank you,

Pete
 
G

Graham Mayor

If you are sure that the merge field produces 0 when empty, you can trap
that with a conditional field

{IF {Mergefield fieldname} <> 0 "{Mergefield Fieldname}"}

If it is supposed to be a numeric field you can use a number switch instead
eg
{Mergefield Fieldname \# "#;;;"}


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
D

Doug Robbins - Word MVP

{ IF { MERGEFIELD fieldthatmightbezero } = 0 "{ MERGEFIELD
fieldthatcomesafterthefieldthatmightbezero }" "{ MERGEFIELD
fieldthatmightbezero }[Space/Carriage Return]{ MERGEFIELD
fieldthatcomesafterthefieldthatmightbezero }" }

You must use Ctrl+F9 to insert each pair of field delimiters { } and use
Alt+F9 to toggle off their display

replace [Space/Carriage Return] with whatever suits your fancy.

--
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
 
N

Night Owl

Thanks guys. I'll give them a go over the weekend.

Best regards,

Pete

Doug Robbins - Word MVP said:
{ IF { MERGEFIELD fieldthatmightbezero } = 0 "{ MERGEFIELD
fieldthatcomesafterthefieldthatmightbezero }" "{ MERGEFIELD
fieldthatmightbezero }[Space/Carriage Return]{ MERGEFIELD
fieldthatcomesafterthefieldthatmightbezero }" }

You must use Ctrl+F9 to insert each pair of field delimiters { } and use
Alt+F9 to toggle off their display

replace [Space/Carriage Return] with whatever suits your fancy.

--
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

Night Owl said:
Will someone tell me, please, how I can suppress (or hide) fields in a
Word mailmerge document that have a value of 0 (Zero).

I'm using Office 2002 SP 3 on a Vista Premium desktop PC.

It's a bit naff sending a letter to someone with a 0 in a blank line in
the middle of their address!

I do need to use Excel for the data base.

Thank you,

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top