How do I print a list of font names installed on my computer?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to print a list of NAMES ONLY of the fonts installed on my
computer. (I need to compare fonts between two computers and don't want to
handwrite the names of all the fonts in the directory. I don't want SAMPLES
of the fonts, just a LIST of the names. I can't figure out how to do it.
 
Sub FontNameList()
Dim vFontName As Variant

Documents.Add

For Each vFontName In FontNames
Selection.TypeText vFontName
Selection.TypeParagraph
Next vFontName

End Sub


Steve Yandl
 
If you use the subroutine I just posted above, you will probably want to
treat the column of names as a table and do a sort so the list is
alphabetical and easier to compare to other lists. An alternate approach
would be to use the sub below which will give you a sorted list in a single
step.

Sub FontNameListSorted()

Const adVarChar = 200
Const MaxCharacters = 255

Dim vFontName As Variant

Documents.Add

Set DataList = CreateObject("ADOR.Recordset")
DataList.Fields.Append "FontNames", adVarChar, MaxCharacters
DataList.Open

For Each vFontName In FontNames
DataList.AddNew
DataList("FontNames") = vFontName
DataList.Update
Next vFontName

DataList.Sort = "FontNames"

DataList.MoveFirst
Do Until DataList.EOF
Selection.TypeText DataList.Fields.Item("FontNames")
Selection.TypeParagraph
DataList.MoveNext
Loop

End Sub


Steve Yandl
 
Back
Top