Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2004

Tip: Looking for answers? Try searching our database.

how do I change numbers into words in microsft words

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hadighan - 11 Dec 2004 09:39 GMT
I am creating a template where I need to have the numbers changed in there
respective words; ex: 256 is two hundred fifty six.
I need this operation to be done by word only
Doug Robbins - 11 Dec 2004 11:13 GMT
With the insertion point in the number, run the following code:

   Dim myrange As Range
   Set myrange = Selection.Words(1)
   Selection.Fields.Add Range:=myrange, Type:=wdFieldEmpty, _
       PreserveFormatting:=False
       myrange.Start = myrange.Start + 1
   myrange.InsertBefore "="
   myrange.InsertAfter "\*cardtext"
   ActiveWindow.View.ShowFieldCodes = Not ActiveWindow.View.ShowFieldCodes
   ActiveWindow.View.ShowFieldCodes = Not ActiveWindow.View.ShowFieldCodes
   Selection.Fields.Update

Signature

Please respond to the Newsgroup for the benefit of others who may be
interested.   Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP

>I am creating a template where I need to have the numbers changed in there
> respective words; ex: 256 is two hundred fifty six.
> I need this operation to be done by word only

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.