H
Harry Hondalf
The VBA scripts that I have found all implement a character-by-character scan throu=
gh the document, which can take a long time in later versions of Word. You can blame Wor=
d's "formatting" feature for the slowdown.
There=E2=80=99s a faster way: Save the document in .rtf format, then open the .rtf fi=
le in a text editor such as notepad.exe. The fonts are listed in a font table ( {\fonttb=
l ) located at the very beginning of the file. Each font entry looks something like thi=
s: =
{\f0\froman\fprq2\fcharset0 Times New Roman;}
Any entries with a character set other than \fcharset0 can be ignored.
(To make it easier to read the temporary rtf file, search for "{" and replace with "<ne=
wline>{", where <newline> means CRLF in Windows, or CR in linux. I dunno what it is in M=
ac.)
Word, of course, doesn=E2=80=99t follow Micro$oft=E2=80=99s own RTF specificati=
on exactly, so sometimes there will be extra tokens (text embedded between braces) w=
ithin the font token.
I wrote a VBA macro that extracts the font names. I'll post the macro here (or email it)=
if anybody's interested.
-sadhu!
url:http://www.ureader.com/gp/1022-1.aspx
gh the document, which can take a long time in later versions of Word. You can blame Wor=
d's "formatting" feature for the slowdown.
There=E2=80=99s a faster way: Save the document in .rtf format, then open the .rtf fi=
le in a text editor such as notepad.exe. The fonts are listed in a font table ( {\fonttb=
l ) located at the very beginning of the file. Each font entry looks something like thi=
s: =
{\f0\froman\fprq2\fcharset0 Times New Roman;}
Any entries with a character set other than \fcharset0 can be ignored.
(To make it easier to read the temporary rtf file, search for "{" and replace with "<ne=
wline>{", where <newline> means CRLF in Windows, or CR in linux. I dunno what it is in M=
ac.)
Word, of course, doesn=E2=80=99t follow Micro$oft=E2=80=99s own RTF specificati=
on exactly, so sometimes there will be extra tokens (text embedded between braces) w=
ithin the font token.
I wrote a VBA macro that extracts the font names. I'll post the macro here (or email it)=
if anybody's interested.
-sadhu!
url:http://www.ureader.com/gp/1022-1.aspx