
Tips.Net > WordTips Home > Macros > Creating Macros > 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.
Word includes two powerful search engines. Do you know how to use them both? You can discover new knowledge with WordTips: Find and Replace. (more information...)
Ask a Word Question
Make a Comment
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