Re: how to get ascii value of a symbols?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



This has been a problem since at least Word 6.0 and maybe earlier.

When you already know the symbol you want, such as the arrow, you can use
the FindSymbol macro in the Macros9.dot template or the FindSymbols macro in
http://word.mvps.org/FAQs/MacrosVBA/FindReplaceSymbols.htm (which also has a
link to download Macros9.dot if you don't have it).

The problem is this: When you insert a symbol from the Insert > Symbols
dialog and it's in a font different from the surrounding text -- for
example, inserting a Wingdings character into Times New Roman -- you don't
want the next regular character you type to be in Wingdings as if you had
changed the font. To avoid that, Word "wraps" the symbol in a special holder
that adopts the font of the surrounding text but contains the symbol and its
font. (It's similar to using an explicit {Symbol} field, but there's no
field there to expand.)

The stupid part is that the wrapper always returns an ASCII value of 40,
which is the same value as a parenthesis. This mistake has been around so
long that the Microsoft Word developers are afraid to change it, for fear of
breaking third-party software.

--
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.

Rama wrote:
Hi All,
I'm looking for code to get the ascii value of a document
symbol in the net for the past 4 days and I'm afraid I might miss my
deadline just because of this small work. If you know how to get
ascii value of sybol please let me know. My code looks like this but
it fails to bring actual ascii value.
ActiveDocument.Bookmarks("xxxsymbol").Select
x= asc(selection.text)

but it doesnt bring actual ascii value of the symbol arrow (ascii 117)
instead it brings out 40.

any ideas?


.



Relevant Pages

  • Re: Inverse of ± ?
    ... standards for a 7-bit character set rather like ASCII - in fact, ... since the standard was and is titled "ISO 7-bit coded character set for information interchange". ... There _is_ ISO 7, too, a series of two standards, but you hardly meant that, since it deals with "pipe threads where pressure-tight joints are made on the threads". ... Right, but what they need is a suitable font, as Andreas explained. ...
    (comp.infosystems.www.authoring.html)
  • Re: ascii font with pdflatex
    ... I just created an ascii table in latex: ... The direct link to the tex file is this: ... with pdflatex, but in this case there seems to be a problem with the ... don't know how to create bitmap font for ASCII. ...
    (comp.text.tex)
  • Re: ACSII Art
    ... want to play with ascii art). ... have set my newsreader to use a monospaced font to read ... for any screen display function you want. ... proportional font that leads you to think that the number of characters ...
    (sci.geo.geology)
  • Re: Podamos
    ... phonetic symbols where, under Unicode, the ASCII character block belongs. ... Above ASCII, you mean. ... 255-character font. ...
    (sci.lang)
  • Re: "It doesnt matter if youre a good programmer, its the syntax that matters"
    ... newlines after them. ... What is it with people and being afraid of binary? ... The point that you snipped was that by converting to ASCII you might ...
    (comp.programming)