Thread: [Solved] Dollar amount in words
View Single Post
 
Old 11-18-2022, 04:05 PM
macropod's Avatar
macropod macropod is online now Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Your field coding has various errors. Try:

{QUOTE{SET Val «PCORevTotalCons»}{=INT(Val) \* CardText}" dollar{=INT(Val)-1 \# "s;s;"}"
{IF{=MOD(Val,1) \# 0.00}> 0 " and {=MOD(Val,1)*100 \# 0 \* CardText} cent{=INT(MOD(Val,1)*100-1) \# "s;s;"}"} \* FirstCap}

You'll find essentially the same field coding in the Mailmerge Tips & Tricks 'Sticky' thread at the top of this page (https://www.msofficeforums.com/mail-...ps-tricks.html), under the heading Mailmerge Number & Currency Formatting

Note: The field brace pairs (i.e. '{ }') for the field code example above are all created in the mailmerge main document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from here. Nor is it practicable (for the most part) to add them via the standard Word dialogues. The spaces shown in the field constructions are all required. The line break, though, isn't needed - it just there for layout purposes
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote