"defined" function

M

Monika Krug

How is the "defined" function for the formula field
working?

I tried { = defined ( { Mergefield x } ) } .

This does print 1 when x is a valid mail merge field, but
when it is not, it does not print 0, but "syntax error"
instead.

TIA,
Monika.
 
P

Peter Jamieson

As far as I know, defined() expects a numeric argument and is really there
to trap divide-by-0 and overflow errors, not "exists" type errors.

I don't think there is a field that will usefully tell you whether a
particular mergefield name is valid or not - you would probably have to use
VBA prior to the merge to do that.

Peter Jamieson
 
M

Monika Krug

Peter Jamieson said:
As far as I know, defined() expects a numeric argument and is really there
to trap divide-by-0 and overflow errors, not "exists" type errors.

I don't think there is a field that will usefully tell you whether a
particular mergefield name is valid or not - you would probably have to use
VBA prior to the merge to do that.

Peter Jamieson

Thank you for this clarification.

Regards,
Monika.
 

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