From: data.file on 7 Jan 2010 13:14 > When you insert symbols from the "Insert > Symbol" dialog, what's inserted > is what I call a "protected" symbol. > If you select the symbol, Word will not show the real (decorative) font > that is applied, but instead the default font for that text. That way, > when the user applies a different font to all the text, the symbols don't > change. > If you choose the Symbol font (or another decorative font) from the font > dropdown and then type something, the inserted symbols not inserted > "protected", i.e. "unprotected". They are more easily dealt with. > > That's what the macro is for: It turns "protected" symbols into > "unprotected" ones, so that their real font becomes accessible. Thanks for the explanation. Which means, provided I understand you correctly, if I want to replace all symbol font characters in a document with unicode ones, I would have to run both your macros, first "unprotecting" whatever symbols might be "protected"? > The Char number is usually &HF000 plus the code of whatever key to type > that symbol. > Say the Greek "alpha", on the key "a" (with code &H0061), would be > ChrW(&HF061). > That's why you see ChrW(61472) = ChrW(&HF020) and ChrW(61695) = > ChrW(&HF0FF) in the macros. > From &HF000 to &HF020 there can't be symbols, because the codes from 0 to > 20 are control characters. This is a bit too technical for me right now. Regards, Sergey
From: data.file on 7 Jan 2010 13:32 How to make your macro SymbolToUnicode work on the whole document without selecting anything first?
From: data.file on 7 Jan 2010 14:34 > You can select the main document story with > ActiveDocument.Content.Select > at the beginning of the mnacro. That much I could have figured out myself. I just prefer when possible to avoid making selections in my macros altogether. > If you have some of the symbols in text boxes, footers, footnotes and so > on, you'd need to loop through all story ranges and run the macro on every > one. > A loop over all story ranges looks something like this: > > Dim myStoryRange As Range > For Each myStoryRange In ActiveDocument.StoryRanges > ' select myStoryRange and call macro > While Not (myStoryRange.NextStoryRange Is Nothing) > Set myStoryRange = myStoryRange.NextStoryRange > ' select myStoryRange and call macro > Wend > Next myStoryRange Thanks for the tip. Regards, Sergey
First
|
Prev
|
Pages: 1 2 Prev: Copy html table to word not keeping settings Next: Cannot get a watermark to insert... |