check to see if field is #

R

raj

i need to check to see if a field is numeric. if it is apply the mask
otherwise just leave it as it is

i have this

{ if { MERGEFIELD "TEST" } < "A" "{MERGEFIELD "BLAH" "mask=$#,##0"}
"{MERGEFIELD "BLAH"} }

please help
 
D

Doug Robbins - Word MVP

A formatting switch of the type \# "$#,##0" will be ignored if the field is
not numeric.

See "Formatting Word fields with switches" on fellow MVP Graham Mayor's
website at

http://www.gmayor.com/formatting_word_fields.htm


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

Doug Robbins - Word MVP

Not for me it doesn't. What are the contents of the field that causes the
problem and exactly what is the construction of the field that you are
using - that is what is contained inside the field delimiters { } that
are display when you select the field and Press Shift + F9 or use Alt + F9
to display all of the field codes.

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

Graham Mayor

Are you inserting the correct switch or your own made up switch from the
original post?

{Mergefield blah \# "$,0"}


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