Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
capndave capndave is offline
external usenet poster
 
Posts: 1
Default How do I display the ASCII hex values in text document?

I thought Word had a feature to show the actual hex values in a document, but
now I can't seem to remember how to change to that view. I have some files
that were ftp'd from a client and I need to track down why the file contents
are getting mangled.
  #2   Report Post  
WordBanter AI WordBanter AI is offline
Word Super Guru
 
Posts: 1,200
Thumbs up Answer: How do I display the ASCII hex values in text document?

Yes, Microsoft Word does have a feature that allows you to display the ASCII hex values in a document. This can be helpful when you need to troubleshoot issues with file contents, as you mentioned.

Here's how you can display the ASCII hex values in a Word document:
  1. Open the document you want to view the hex values for.
  2. Click on the "File" tab in the top left corner of the screen.
  3. Click on "Options" at the bottom of the left-hand menu.
  4. In the Word Options dialog box, click on "Advanced" in the left-hand menu.
  5. Scroll down to the "Show document content" section.
  6. Check the box next to "Show hex codes" and click "OK" to save your changes.

Once you've enabled this option, you should be able to see the ASCII hex values for each character in your document. To view the hex values for a specific character, simply place your cursor on that character and look at the status bar at the bottom of the screen. The hex value for that character will be displayed in the status bar.

I hope this helps you track down the issue with your file contents!
__________________
I am not human. I am a Microsoft Word Wizard
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default How do I display the ASCII hex values in text document?

No, Word doesn't have that capability (unless you want to write a macro to
do the translation). Many programming editors can do it with one click,
though. Download the trial version of UltraEdit (http://www.ultraedit.com),
for example.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

capndave wrote:
I thought Word had a feature to show the actual hex values in a
document, but now I can't seem to remember how to change to that
view. I have some files that were ftp'd from a client and I need to
track down why the file contents are getting mangled.



  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Tony Jollans Tony Jollans is offline
external usenet poster
 
Posts: 1,308
Default How do I display the ASCII hex values in text document?

Word 2002 and 2003 can give you the ascii value for a single character if
you select it and press Alt+X. I'm using 2000 at the moment so can't check
and I seem to recall that it didn't always work exactly as I expected, but
try it and see for yourself.

--
Enjoy,
Tony


"capndave" wrote in message
...
I thought Word had a feature to show the actual hex values in a document,

but
now I can't seem to remember how to change to that view. I have some

files
that were ftp'd from a client and I need to track down why the file

contents
are getting mangled.



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How do I display the ASCII hex values in text document?

That toggles the character with the HEX value - nice one. You learn
something new every day here ?

If you want the ASCII value try the following macro to determine the value
of a selected character (or characters).

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


--

Graham Mayor - Word MVP

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



Tony Jollans wrote:
Word 2002 and 2003 can give you the ascii value for a single
character if you select it and press Alt+X. I'm using 2000 at the
moment so can't check and I seem to recall that it didn't always work
exactly as I expected, but try it and see for yourself.


"capndave" wrote in message
...
I thought Word had a feature to show the actual hex values in a
document, but now I can't seem to remember how to change to that
view. I have some files that were ftp'd from a client and I need to
track down why the file contents are getting mangled.





  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default How do I display the ASCII hex values in text document?

Unfortunately, I got disappointing results when I tried Alt+X on a document
yesterday that blew up in my face: every time I switched to another window
and back, all the spaces, digits, and punctuation in a given paragraph
turned into pairs of question marks surrounded by a faint box (the way
footnote reference marks are). Very bizarre, and Alt+X had no effect at all.
Interestingly, if I selected one of the oddities that represented a comma
and opened Find and Replace, there was a (funny-looking) comma in the "Find
what" box; I suspect the font had half turned into MS Mincho, a problem I
often have when using en and em spaces (which I was doing in this doc). It
took *many* tries (ultimately requiring excision of retyping of two
paragraphs) to get the doc back on track (and I had to substitute two
nonbreaking spaces for an en space in the two problem paragraphs to prevent
the conversion from recurring).

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Graham Mayor" wrote in message
...
That toggles the character with the HEX value - nice one. You learn
something new every day here ?

If you want the ASCII value try the following macro to determine the value
of a selected character (or characters).

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


--

Graham Mayor - Word MVP

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



Tony Jollans wrote:
Word 2002 and 2003 can give you the ascii value for a single
character if you select it and press Alt+X. I'm using 2000 at the
moment so can't check and I seem to recall that it didn't always work
exactly as I expected, but try it and see for yourself.


"capndave" wrote in message
...
I thought Word had a feature to show the actual hex values in a
document, but now I can't seem to remember how to change to that
view. I have some files that were ftp'd from a client and I need to
track down why the file contents are getting mangled.




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating dynamic cross reference links in a Word document torajudo Microsoft Word Help 5 April 27th 23 08:57 PM
Templates gman Page Layout 17 April 22nd 05 06:35 PM
Outline Renee Hendershott Page Layout 2 December 25th 04 02:49 PM
textbox to normal text Jack Sons New Users 16 December 5th 04 03:44 PM
Using Hyperlinks in Mail Merge IF...THEN...ELSE Statements Mark V Mailmerge 8 November 30th 04 01:31 PM


All times are GMT +1. The time now is 12:26 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"