Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2005

Tip: Looking for answers? Try searching our database.

Finding Chrw Codes.....

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Deepak Mhaskar - 17 Sep 2005 06:51 GMT
Hi,

I am newbie to VBA programming. I want to find Greek Symbols through VBA.
But i don't know Chrw codes..i.e., Chr(13).... Where i can find the list of
chr codes. Or anyone can give me the list.

Thanks in Advance.
Jay Freedman - 17 Sep 2005 13:08 GMT
>Hi,
>
[quoted text clipped - 3 lines]
>
>Thanks in Advance.

Open the Insert > Symbol dialog, set the font to Symbol or whatever
font you're using, and set the dropdown at the bottom right to Unicode
or ASCII. As you click on each character, its character code value
will be displayed.

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Graham Mayor - 17 Sep 2005 14:32 GMT
Or select the character in a document and run the following macro

Sub ANSIValue()
S1$ = "Because the selected text contains"
S2$ = " characters, not all of the ANSI values will be displayed."
S3$ = "ANSI Value ("
S4$ = " characters in selection)"
S5$ = " character in selection)"
S6$ = "Text must be selected before this macro is run."
S7$ = "ANSI Value"
Dim strSel As String
Dim strNums As String
Dim LastFourChar As String
Dim iPos As Integer
strSel = Selection.Text
If Len(strSel) > 0 Then
   For i = 1 To Len(strSel)
       strNums = strNums + Str(Asc(Mid(strSel, i)))
   Next i
   strNums = LTrim(strNums)
   If Len(strNums) > 255 Then
       LastFourChar = Mid(strNums, 252, 4)
       strNums = Left(strNums, 251) + Left(LastFourChar, 4 - InStr(" ",
LastFourChar))
       MsgBox S1$ + Str(Len(strSel)) + S2$
   End If
   If Len(strSel) = 1 Then S4$ = S5$
   MsgBox strNums, 0, S3$ + LTrim(Str(Len(strSel))) + S4$
Else
   MsgBox S6$, 0, S7$
End If
End Sub

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

>
>> Hi,
[quoted text clipped - 9 lines]
> or ASCII. As you click on each character, its character code value
> will be displayed.
Klaus Linke - 18 Sep 2005 14:32 GMT
If it's Unicode (as opposed to Symbol font), you could also look at
http://www.unicode.org/charts/PDF/U0370.pdf

If you want to insert them, use ChrW instead of Chr.
And you can use hex numbers by putting &H in front of the code:

Selection.InsertAfter ChrW(&H03C0)

Regards,
Klaus

>>Hi,
>>
[quoted text clipped - 14 lines]
> Jay Freedman
> Microsoft Word MVP        FAQ: http://word.mvps.org 
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.