View Single Post
 
Old 07-31-2019, 01:28 AM
Marcia's Avatar
Marcia Marcia is offline Windows 7 32bit Office 2013
Expert
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default Construction of a value to amount in words in mail merge

Hi all, in a mail merge with excel as its data source, the currency amounts in the main document must be written in words and in numbers. I copied the code:
{QUOTE {ASK Val "What is the amount?"}"{=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;"}"}"}
From: How to spell out numbers in Microsoft Word - Microsoft Community
that Mr. Paul Edstein wrote. I substituted the "What is the amount?" with the appropriate mergefield {MERGEFIELD Grand Total} then changed the dollar to pesos because that is our currency. When I pressed F9, I got the following:

I don't know what information to enter in the box so I just pressed OK. Another error message in the main document came out like this:!Undefined Bookmark, VAL dollar!Undefined Bookmark, VAL>0 ’. Kindly point out where I erred and what to enter in the above box. The amounts in the data do not run to hundreds of thousands so I prefer this code than macro. Thank you.
Reply With Quote