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: You may need to determine the numeric value of a character in a macro. You can do that using the Asc function, described in this tip. (This tip works with Microsoft Word 97, Word 2000, Word 2002, Word 2003, and Word 2007.)

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(sMyString)

where x is the variable that the ANSI value should be assigned to, and sMyString is the string to be analyzed.

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


Take Control! Master the real power behind Word! Successfully master the secrets of powerful formatting and create documents that stand out from the rest. Best of all, you can create documents that are easy to maintain and quick to change.
 
Check out Word 2007 Styles and Templates today!

Helpful Links

Ask a Word Question
Make a Comment

Tips.Net Home

WordTips FAQ
WordTips Premium

Learn Access Now

Bugs and Pests Tips
ExcelTips
Family Tips
Health Tips
Home Tips
Organizing 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.)