Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
docvariable fields - force negative numbers to disred OR paren - h
How do you force a negative doc variable field (popualtesd via OLE from
another application) to either appear red in Word OR display as opena nd close parenthesis? Standard formatting option froces two decimals which is not aloowed, so am looking fro antoerh way. Thanks!! |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
docvariable fields - force negative numbers to disred OR paren - h
Specifically, what would syntax be:
Now I am passign value as follows: worddoc.variables(wordField).value = Cstr( Format (Cdbl (tmpItem.text) , "#,0.00") ) I suppose I would add another line under this (the Word doc has NOT been updated yet), that (If value is negative Then) worddoc.variables(wordField).font.color = wdColorRed ???? I know this syntax is wrong, but here is where I need help! Thanks. "Lisa" wrote: How do you force a negative doc variable field (popualtesd via OLE from another application) to either appear red in Word OR display as opena nd close parenthesis? Standard formatting option froces two decimals which is not aloowed, so am looking fro antoerh way. Thanks!! |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
docvariable fields - force negative numbers to disred OR paren - h
You need a negative formatting switch on your Word field eg
\# "positive;negative;zero" \# ",0.00;(,0.00);0.00" and format each part as you want - see http://www.gmayor.com/formatting_word_fields.htm Remove any charformat or mergeformat switch -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Lisa wrote: Specifically, what would syntax be: Now I am passign value as follows: worddoc.variables(wordField).value = Cstr( Format (Cdbl (tmpItem.text) , "#,0.00") ) I suppose I would add another line under this (the Word doc has NOT been updated yet), that (If value is negative Then) worddoc.variables(wordField).font.color = wdColorRed ???? I know this syntax is wrong, but here is where I need help! Thanks. "Lisa" wrote: How do you force a negative doc variable field (popualtesd via OLE from another application) to either appear red in Word OR display as opena nd close parenthesis? Standard formatting option froces two decimals which is not aloowed, so am looking fro antoerh way. Thanks!! |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I create negative numbers in Equation editor | New Users | |||
DocVariable fields adjacent to end of cell marks display wrongly | Tables | |||
How to format negative numbers in Word tables | Tables | |||
How do I set up calculation fields in Word with negative numbers? | Microsoft Word Help | |||
Negative numbers at end of line | Microsoft Word Help |