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

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.
 
S

Steve Yandl

Sub FontNameList()
Dim vFontName As Variant

Documents.Add

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

End Sub


Steve Yandl
 
S

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top