Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert "1st" to "First"?

Status
Not open for further replies.

grannyM

Programmer
Nov 26, 2002
39
US
I'm programming a Word Document where the user will input an Amendment Number. If they input "1st" or "23rd" instead of "First" or "Twenty-Third", the macro needs to convert it before inserting it into the document. Haven't been able to find a function or format that does this. Any help would be appreciated.

Thanks!
 
This might put you on the right track:

Code:
Sub AutoCorrect()
With Application.AutoCorrect.Entries
    .Add Name:="1st", Value:="first"
    .Add Name:="3rd", Value:="third"
    '.Add etc.......
End With
End Sub

Or you could just go directly to the Tools->Auto Correct... settings.

I hope this helps!



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top