Re: how to get ascii value of a symbols?
- From: "Jay Freedman" <jay.freedman@xxxxxxxxxxx>
- Date: Mon, 22 May 2006 10:26:14 -0400
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?
.
- Prev by Date: Re: What are the Parts (components) and uses (applications) of Wor
- Next by Date: Re: how do I disable the auto-date feature for old files?
- Previous by thread: Re: how to get ascii value of a symbols?
- Next by thread: Re: How do i re-arrange different points into paragraphin MS-word
- Index(es):
Relevant Pages
|