bottom
Great WordTips!
         
Your e-mail address is safe!
Close Note

Tips.Net > WordTips Home > Macros > Creating Macros > Determining an ANSI Value

Determining an ANSI Value

Summary: Extracting the numeric code for a character. (This tip works with Microsoft Word 6, Word 95, Word 97, Word 2000, Word 2002, and Word 2003.)

You can use the Asc function to determine the ANSI value of the first letter of a string. In early versions of BASIC, Asc returned the ASCII value, but Word uses only ANSI values. The function uses the following format:

x = Asc(y)

where x is the variable that the ANSI value should be assigned to, and y is the string to be analyzed. This approach will work in either WordBasic or VBA.

Tip #737 applies to Microsoft Word versions: 6 | 95 | 97 | 2000 | 2002 | 2003


Take Control! Experienced users know that styles can make the difference between a plain document and a masterful one. This is the real power behind Word, and the key to that power can be found in WordTips: Styles and Templates.

Helpful Links

Ask a Word Question
Make a Comment

Tips.Net Home
Vital News Home

WordTips FAQ
WordTips Premium

Learn Access Now

Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 Tips
WordTips

Advertise on the
WordTips Site

 

Great Info!

Get tips like this every week in WordTips, a free productivity newsletter. Enter your e-mail address and click "Subscribe."
     
(Your e-mail address will never be shared with anyone, ever.)