What's That Character?

Here's the scenario: You open a giant document from a client and start looking through it. But what's this? The same odd character at the beginning of every paragraph. Must be some kind of file translation error. Odder still, Microsoft Word won't let you paste the character into its Find and Replace dialog, so how are you going to get rid of them all? By hand? Horrors!

If you knew the character's numeric code, you could search for it, as explained in our last newsletter:

http://www.topica.com/lists/editorium/read/message.html?sort=d&mid=1704081834

But this character isn't on the usual list. How can you find out its numeric code? By using our trusty NextCharacter macro:

FOR MICROSOFT WORD 6 OR 7 (95):

'THE MACRO STARTS HERE
NextChar$ = Str$(Asc(Selection$()))
MsgBox "The code for the next character is " 
+ NextChar$ + ".", "Next Character"
'Macro ends here
FOR MICROSOFT WORD 8 (97 OR 98) OR 9 (2000 OR 2001):
'Macro starts here
Dim NextChar$
NextChar$ = Str(Asc(WordBasic.[Selection$]()))
WordBasic.MsgBox _
"The code for the next character is " + NextChar$ + ".", _
"Next Character"
'THE MACRO ENDS HERE

TO CREATE THE MACRO

1. Copy the appropriate macro from this newsletter.

2. Click the "Tools" menu at the top of your Word window.

3. Click "Macro."

4. In Word 97, 98, 2000, or 2001, click "Macros."

5. Make sure "Macros Available In" shows "Normal.dot."

6. Type a name for the macro in the "Macro Name" box--"NextCharacter" should do nicely.

7. Click "Create."

8. Paste the macro at the current insertion point.

9. In Word 6 or 7, click "File," then "Close," then "Yes." In Word 97, 98, 2000, or 2001, click "File," then "Close and Return to Microsoft Word."

TO RUN THE MACRO:

1. Put your cursor in front of the character whose numeric code you want to know.

2. Click the "Tools" menu at the top of your Word window.

3. Click "Macro."

4. In Word 97, 98, 2000, or 2001, click "Macros."

5. Make sure "Macros Available In" shows "Normal.dot."

6. Select the macro (probably "NextCharacter") in the "Macro Name" box.

7. Click "Run."

After you run the macro, a message box will appear on your screen with the numeric code you need.

This entry was posted in Editing. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

You must be logged in to post a comment.

  • The Fine Print

    Thanks for reading Editorium Update (ISSN 1534-1283), published by:

    The EDITORIUM, LLC
    http://www.editorium.com

    Articles © on date of publication by the Editorium. All rights reserved. Editorium Update and Editorium are trademarks of the Editorium.

    You may forward copies of Editorium Update to others (but not charge for it) and print or store it for your personal use. Any other broadcast, publication, retransmission, copying, or storage, without written permission from the Editorium, is strictly prohibited. If you’re interested in reprinting one of our articles, please send an email message to editor@editorium.com

    Editorium Update is provided for informational purposes only and without a warranty of any kind, either express or implied, including but not limited to implied warranties of merchantability, fitness for a particular purpose, and freedom from infringement. The user (you) assumes the entire risk as to the accuracy and use of this document.

    The Editorium is not affiliated with Microsoft Corporation or any other entity.

    We do not sell, rent, or give our subscriber list to anyone. Period.

    If you’d like to subscribe, please enter your name and email address below. We publish the newsletter once a week, and on rare occasions we may send an important announcement. We never, ever send spam. Thank you for signing up!