![]() |
#8
|
||||
|
||||
![]() Quote:
Code:
{QUOTE {ASK Val "What is he amount?"} {SET AbsVal {=ABS(Val)}} {IF{=Val}< 0 "Minus "} {IF{=INT(AbsVal/100000000)}<> 0 "{=INT(AbsVal/100000000) \*Cardtext} hundred "} {IF{=MOD(INT(AbsVal/1000000),100)} <> 0 "{IF{=INT(AbsVal/100000000)}<> 0 "and "}"} {IF{=INT(AbsVal/1000000)}<> 0 "{=MOD(INT(AbsVal/1000000),100) \*Cardtext} million, "} {IF{=INT(AbsVal/100000)}<> 0 "{=MOD(INT(AbsVal/100000),10) \*Cardtext} hundred "} {IF{=MOD(INT(AbsVal1000),100)} <> 0 "{IF{=INT(AbsVal/100000)}<> 0 "and "}"} {IF{=INT(AbsVal/1000)}<> 0 "{=MOD(INT(AbsVal/1000),100) \*Cardtext} thousand, "} {IF{=MOD(INT(AbsVal/100),10)}<> 0 "{=MOD(INT(AbsVal/100),10) \*Cardtext} hundred "} {IF{=MOD(INT(AbsVal),100)}<> 0 "{IF{=INT(AbsVal/100)}<> 0 "and "}{=MOD(INT(AbsVal),100) \*Cardtext} "} {=INT(AbsVal) \# \dollar;;}{IF{=INT(AbsVal)}> 1 "s"} {IF{=MOD(AbsVal,1)}<> 0 "{IF{=INT(AbsVal)}<> 0 " and "}{=MOD(AbsVal,1)*100 \*Cardtext} cent{IF{=MOD(AbsVal,1)}> 0.01 s}"} \* FirstCap} Note: The field brace pairs (ie '{ }') for the above example are created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. You could also use a macro to convert the above to a working field. For that, see: http://www.gmayor.com/export_field.htm#TextToField Quote:
Quote:
Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating a graph for Future Value function (FV function) | bmoody | Excel | 2 | 11-06-2013 10:52 AM |
[HELP]Word: sub or function not defined | royankidding | Word VBA | 0 | 08-29-2013 12:11 AM |
OnClick function in Word | Lakshit | Word | 0 | 09-27-2011 12:11 AM |
Is there a function on MS Word showing the lastest changes made on a word file? | _____ | Word | 2 | 10-30-2010 05:33 AM |
Inserting citations using the reference function in Microsoft Word 2007? | aeyara | Word | 0 | 09-28-2009 05:33 PM |