WD: How to Determine ASCII Value of Any CharacterLast reviewed: February 2, 1998Article ID: Q27885 |
The information in this article applies to:
SUMMARY
Word for Windows 6.x, Word for the Macintosh 6.xIn Word, you can find the ASCII value of any single character by selecting the character and then running the following macro.
Sub Main Rem The symbol must be selected before running the macro. AsciiVal$ = Str$(Asc(Selection$()) MsgBox "The ASCII value is " + AsciiVal$ End SubNOTE: You can use this macro in Word for Windows, versions 6.x or 7.x. However, if the character was inserted using the Symbol dialog box (Insert menu) the value returned is always incorrect. If the symbol was inserted using Character Map, the macro returns the correct ASCII value
Word for the Macintosh 5.xIn Word for the Macintosh, versions 5.0 and 5.1, the Symbol command is used for determining the ASCII value of a character. To use the Symbol command, do the following:
If the Symbol command is not installed, COMMAND+OPTION+Q will work as described below for Word versions 4.0 and 3.0x. Word for the Macintosh 3.0, 4.0 In Microsoft Word for the Macintosh, versions 3.0 or 4.0, you can find the ASCII value of any single character by selecting the character and then pressing COMMAND+OPTION+Q. The ASCII value then appears in the lower-left corner of the window. If you do not select any text, or if you select more than one character, the lower-left corner prompts you with "Code." You can then type in a specific ASCII value (integer) and press the RETURN key on the main keyboard or the ENTER key on the numeric keypad to insert the character with that value.
MORE INFORMATIONOnce you use the "Paste Special Character" command by pressing COMMAND+OPTION+Q, you can repeat the action by clicking the lower-left corner. This is true of any special procedures that use the lower-left corner. Other special procedures include "Apply Style Name" (COMMAND+SHIFT+S), "Change Font" (COMMAND+SHIFT+E), "Insert Glossary Text" (COMMAND+BACKSPACE or DELETE).
|
Additional query words: forty
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |