mailmerge field conditionally suppressed

A

Angelaf

I want one mailmerge field to be conditionally suppressed if another is not
null

ie: if isnull organisation_name then contact_name

One name only to appear - that is Contact name to appear instead of
Organisation name only if there is no Organisation name .

I can't get this to work. Any ideas please ?
 
P

Peter Jamieson

Try the following nested fields:

{ IF "{ MERGEFIELD organisation_name }" = "" "{ MERGEFIELD contact_name }"
"{ MERGEFIELD organisation_name }" }

You can insert each pair of the special field braces "{}" using ctrl-F9 and
type all the remaining text in the usual way.

Peter Jamieson
 
A

Angelaf

Thanks Peter - doesn't work though, I just get nothing at all printed with
either condition. It may be because the merge is using Access fields and
running from within an Access application. Whne inserting single Mailmerge
fields they are enclosed in angle brackets << >>

Maybe it can't be done ........
 
P

Peter Jamieson

Thanks Peter - doesn't work though, I just get nothing at all printed with
either condition.

Can you verify that /all/ the {} are the special field code braces (that'#s
the usual problem with nested fields) ? If you click Alt-F9, you should see
the "field codes". Then if you try to select (say) the first { in any of the
fields, Word should select the whole field.

If you just insert { MERGEFIELD organisation_name } on its own, is it
definitely blank when it is null in Access? (e.g. try putting something like
x{ MERGEFIELD organisation_name }x and see if anything appears between the
two "x" s when you update the field.

If you're running from within Access, the most likely problem is that Word
is simply not connecting to its data source. However, if you enable the Mail
Merge tool bar, it should be reasonably obvious one way or the other because
typically most of the icons after the first two will be greyed f there is no
connection.

Peter Jamieson
 
D

Doug Robbins - Word MVP

It is better to to the data manipulation in a data base rather than in a
word processor. Use the IIF() function in an Access Query and use that
Query as the data source.

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

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