Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Printing and Fonts / March 2005

Tip: Looking for answers? Try searching our database.

List of used fonts

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Arno - 18 Mar 2005 10:15 GMT
Hi,

Is there a way to get a list of fonts used in a Word (2000) document?

If not, does anyone knows where/how the fontnames are stored in the binary
(doc) file?

Regards,

Arno
Thomas Ferguson - 18 Mar 2005 11:28 GMT
In answer, I quote myself from an earlier post about fonts used

This is one such VBA macro that works in recent Word versions-

Public Sub ListFontsInDoc()
Dim FontList(199) As String
Dim FontCount As Integer
Dim FontName As String
Dim J As Integer, K As Integer, L As Integer
Dim X As Long, Y As Long
Dim FoundFont As Boolean
Dim rngChar As Range
Dim strFontList As String

FontCount = 0
X = ActiveDocument.Characters.Count
Y = 0
' For-Next loop through every character
For Each rngChar In ActiveDocument.Characters
Y = Y + 1
FontName = rngChar.Font.Name
StatusBar = Y & ":" & X
' check if font used for this char already in list
FoundFont = False
For J = 1 To FontCount
If FontList(J) = FontName Then FoundFont = True
Next J
If Not FoundFont Then
FontCount = FontCount + 1
FontList(FontCount) = FontName
End If
Next rngChar

' sort the list
StatusBar = "Sorting Font List"
For J = 1 To FontCount - 1
L = J
For K = J + 1 To FontCount
If FontList(L) > FontList(K) Then L = K
Next K
If J <> L Then
FontName = FontList(J)
FontList(J) = FontList(L)
FontList(L) = FontName
End If
Next J

StatusBar = ""
' put in new document
Documents.Add
Selection.TypeText Text:="There are " & FontCount & " fonts used in
the document, as follows:"
Selection.TypeParagraph
Selection.TypeParagraph
For J = 1 To FontCount
Selection.TypeText Text:=FontList(J)
Selection.TypeParagraph
Next J
End Sub

To use, see the help system about how to use this listing to make a
working macro.

Basic steps:
 1.. On the Tools menu, point to Macro, and then click Macros.
 2.. In the Macros in list, click the template (template: A file or
files that contain the structure and tools for shaping such elements as
the style and page layout of finished files. For example, Word templates
can shape a single document, and FrontPage templates can shape an entire
Web site.) or document in which you want to store the macro.
 3.. In the Macro name box, type a name for the macro.
 4.. Click Create to open the Visual Basic Editor

Plan B

Use the import text from any document to open the document. Near the
bottom of the resulting display in word will be a list of fonts used in
the document. Do _not_ save the document unless you chage the "save as"
name or you will lose all the document's formatting.

Let us know.
Tom
MSMVP
Windows Shell/User

Signature

In memoriam to a distinguished
colleague and friend to all he knew
MVP Alex Nichol ? 9th Mar., 2005
http://www.dts-l.org/

: Hi,
:
[quoted text clipped - 6 lines]
:
: Arno
Arno - 18 Mar 2005 11:47 GMT
Thanks a lot Tom!!!
I'll let you know if I can get it working.

Kind regards,

Arno
Arnovdw - 18 Mar 2005 16:58 GMT
Tom,

It works like a charm! Thanks a lot!

Kind regards,

               Arno
Suzanne S. Barnhill - 18 Mar 2005 16:15 GMT
If you open the document using the Recover Text from Any File setting, there
is a font list toward the end. Be careful not to save in this format and to
reset the "Files of type" setting afterward.

Signature

Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

> Hi,
>
[quoted text clipped - 6 lines]
>
> Arno
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.