What character is at the cursor?

  • Thread starter Thread starter Pete Forman
  • Start date Start date
P

Pete Forman

Word has the ability through auto-correct or insert symbol to write
characters that are similar to standard ones. How can you go the
opposite way, to find out what character is there? For example an
en-dash and minus sign have similar appearance.
 
You can determine the character code (in ASCII decimal format) of the first
character in the selection or the character to the right of the insertion
point as follows:
Press Alt+F11 to open the Visual Basic Editor (VBE).
In the Immediate window (press Ctrl+G if the window is not visible), type:

?Asc(Selection.Characters(1))
Then press Return. This will display the character number.

When you select a character in the "Symbols" tab of the Symbol dialog box,
the character code will be displayed at the bottom of the dialog box. Note
that you can select from different formats in the "from" field. You can also
type the code in the "Character code" field and the corresponding character
of the selected font will be selected in the character table.

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word
 
Select the character and open the Insert | Symbol dialog. The corresponding
character will be selected and the description and character number given in
the dialog. If you have Word 2002 or 2003, select the character and press
Alt+X. The Unicode character number will be produced (Alt+X again to toggle
back).

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Suzanne's methods are easier than the method I described. However, they will
not show the character code of all types of characters (e.g. paragraphs
marks, optional hyphens, manual line breaks, page breaks and cell markers).
If you need the character code of such characters, you can use the Immediate
window method.

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word
 
The characters you mention are nonprinting characters and, as such, are
merely artifacts, so it makes sense that Alt+X wouldn't return a character
code for them. Given that most users never even see them, that's probably
irrelevant to the OP's question, but your method is a good one to know
anyway, just in case.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top