PC Review


Reply
Thread Tools Rate Thread

How can I find an escape code?

 
 
=?Utf-8?B?bWFyb2s=?=
Guest
Posts: n/a
 
      24th Oct 2007
Is there a way of getting Word to disclose the escape code of a displayed
character?

 
Reply With Quote
 
 
 
 
Graham Mayor
Guest
Posts: n/a
 
      24th Oct 2007
I suspect the following macro is what you are looking for?

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, strNums, 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

http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

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

marok wrote:
> Is there a way of getting Word to disclose the escape code of a
> displayed character?



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find question marks -- need escape character EllenM Microsoft Access Queries 3 26th Feb 2009 01:07 AM
Find question marks -- need escape character EllenM Microsoft Access Queries 0 25th Feb 2009 04:42 PM
Printer control with Escape code Oliver Microsoft C# .NET 0 11th Aug 2006 01:44 AM
Need VBA Code for the Escape Command =?Utf-8?B?TERNdWVsbGVy?= Microsoft Access VBA Modules 2 18th May 2006 01:52 PM
Escape button --> code? =?Utf-8?B?WnVybg==?= Microsoft Access VBA Modules 4 20th Oct 2005 07:21 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:19 PM.