×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Unicode Values for Symbols

Unicode Values for Symbols

Unicode Values for Symbols

(OP)
This question sort of ties in with an earlier one on macros. Basically, I am trying to write a macro for Word that will find a predefined bunch of symbols and replace them with their ASCII equivalent.  What I have now uses the find and replace code to find symbols, using the ChrW(n) value for the find value, and the ASCII code for the replace. My problem now is how to get a complete listing of the "unicode values" Word uses. I used the code below that I found on the microsoft site to generate unicode values:

Sub UnicodeGenerator()
Dim I As Integer
Documents.Add
' Set tab stops for clarity.
Selection.ParagraphFormat.TabStops.ClearAll
ActiveDocument.DefaultTabStop = InchesToPoints(0.5)
Selection.ParagraphFormat.TabStops.Add Position:= _
InchesToPoints(1.5), Alignment:=wdAlignTabCenter, _
Leader:=wdTabLeaderDots
' Insert column headings.
Selection.InsertAfter "Characters" & Chr(9) & "UniCode Values"
Selection.InsertParagraphAfter
' Character values below 30 generate undesirable results
' when inserted into a document. For example, page breaks
' and column breaks.
For I = 30 To 255
' Insert the character, a tab and the Unicode equivalent.
Selection.InsertAfter Chr(I) & Chr(9) & AscW(Chr(I))
Selection.InsertParagraphAfter
Next
End Sub

The problem with this code is that it doesn't generate unicode values for symbols such as greek letters etc.  Another problem is that the uncode values generated don't seem to match with lists I got off of the Unicode Consortium site. For instance, the above code generates a value of 176 for the degree sign, while the Unicode Consortium gives 00B0 as the value. This may be a simple conversion that I am not aware of, but my main problem is not knowing how to generate the proper values (proper for word to use) for greek letters.

Any suggestions?

Ben

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close