I am creating a form in Word. When a negative number is entered in the text
form field I want the negative number to be in red instead of a parenthesis.
Can this be done?
Hello Lisa
> I am creating a form in Word. When a negative number is entered in the text
> form field I want the negative number to be in red instead of a parenthesis.
yes, easily: in Excel! :-)
In Word, you'll probably need an on-exit macro assigned to the field
(that changes the color).
HTH
Robert

Signature
/"\ ASCII Ribbon Campaign | MSFT |
\ / | MVP | Scientific Reports
X Against HTML | for | with Word?
/ \ in e-mail & news | Word | http://www.masteringword.eu/
Graham Mayor - 29 May 2008 15:41 GMT
Assuming the field bookmark name is "Text1" then the following run on exit
from the field will format negative numbers in red.
Sub NegFormat()
Dim oFld As FormFields
Set oFld = ActiveDocument.FormFields
If oFld("Text1").Result < 1 Then
oFld("Text1").Range.Font.Color = wdColorRed
Else
oFld("Text1").Range.Font.Color = wdColorBlack
End If
End Sub
For a numeric field entry type set the field format to 0.00 or 0

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Hello Lisa
>
[quoted text clipped - 9 lines]
> HTH
> Robert
Robert M. Franz (RMF) - 29 May 2008 22:57 GMT
Hi Graham
> Assuming the field bookmark name is "Text1" then the following run on exit
> from the field will format negative numbers in red.
[quoted text clipped - 3 lines]
> Set oFld = ActiveDocument.FormFields
> If oFld("Text1").Result < 1 Then
< 0 ?
Greetinx
Robert
ps: no, I didn't test it! :-)

Signature
/"\ ASCII Ribbon Campaign | MSFT |
\ / | MVP | Scientific Reports
X Against HTML | for | with Word?
/ \ in e-mail & news | Word | http://www.masteringword.eu/