Jean-Guy
Fri Jan 14 14:57:30 CST 2005
Klaus Linke was telling us:
Klaus Linke nous racontait que :
>> Will AscW return the real Unicode number for the Wingding et all.
>> sets (or other inserted "symbols")?
>
> With regular fonts, you don't have much problems.
> Each symbol has it's specific code, independent of the font.
>
> Say 263A, Alt+X (or using the decimal code: Alt+9786) produces the
> Unicode character "white smiling face", or smiley (though most fonts
> may not contain that special symbol).
> AscW(Selection.Text) used on that character will give you 9786,
> Hex(AscW(Selection.Text)) will give you 263A.
>
> But decorative fonts like the Wingdings font you have mentioned are
> problematic.
> Word has no way to determine what symbols such a symbol font may
> contain.
> Those symbols aren't even necessarily defined in the Unicode Standard.
>
> So Word uses codes in the code page at U+F000 (decimal 61440) for
> them.
>
> Take a "smiley" from Wingdings as an example,
> -- It is produced by the "J" key
> (which has hex code 4A, or decimal code 74)
> -- corresponds to U+F04A (= F000+4A)
> equals decimal 61514 (61440+74)
>
> You can for example search for it with u+61514 in "Find what".
> Or you can insert it in text using ChrW(61514) or ChrW(&HF04A) in a
> macro (or F04A, Alt+X, or Alt+61514, in text), and format it in
> "Wingdings" font.
> Here you need both the code and the font to specify the character.
>
Ouch!
Messy!
Thanks for taking the time!
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site:
http://www.word.mvps.org