Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-31-2019, 01:28 AM
Marcia's Avatar
Marcia Marcia is offline Construction of a value to amount in words in mail merge Windows 7 32bit Construction of a value to amount in words in mail merge Office 2013
Expert
Construction of a value to amount in words in mail merge
 
Join Date: May 2018
Location: Philippines
Posts: 526
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
  #2  
Old 08-06-2019, 06:51 PM
macropod's Avatar
macropod macropod is offline Construction of a value to amount in words in mail merge Windows 7 64bit Construction of a value to amount in words in mail merge Office 2010 32bit
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

Change:
{ASK Val "What is the amount?"}
to:
{SET Val {MERGEFIELD Grand Total}}
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 08-08-2019, 06:08 AM
Marcia's Avatar
Marcia Marcia is offline Construction of a value to amount in words in mail merge Windows 7 32bit Construction of a value to amount in words in mail merge Office 2013
Expert
Construction of a value to amount in words in mail merge
 
Join Date: May 2018
Location: Philippines
Posts: 526
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

Thank you Paul. It is perfect! The code made the spellnumber column in the Excel data source redundant.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge - Covering Letter with multiple additional pages not always the same amount lsirobinson Mail Merge 3 10-11-2015 11:33 PM
Mail merge how to link mail merge field value to a column heading dsummers Mail Merge 1 05-08-2014 02:59 PM
Mail Merge only sends to a select amount of recipients. Lb145 Outlook 2 05-07-2014 02:06 AM
Mail Merge only sends to a select amount of recipients. Lb145 Mail Merge 11 05-06-2014 03:15 PM
Construction of a value to amount in words in mail merge mail merge with excel and words don0712 Mail Merge 1 01-29-2013 06:53 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:29 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft