FontList

P

Prixton

Hi,
In earlier versions of Word there was a macro to print a list of all fonts.
I am running 2003 and can not find a way to list the fonts and how they
look. Is there anyone who can help me?

Regards
 
J

Jenny

Hi,
Try this macro:
Sub ListFonts()



Dim varFont As Variant

' Speeds macro processing and suppresses display.

Application.ScreenUpdating = False

' Create new document.

Documents.Add Template:="normal"



' Loop through each available font.

For Each varFont In FontNames

With Selection

' Format for name of font.

.Font.Name = "times new roman"

.Font.Bold = True

.Font.Underline = True

' Insert Font name.

.TypeText varFont

' Insert a new paragraph after the Font Name.

.InsertParagraphAfter

' Move to the new paragraph.

.MoveDown unit:=wdParagraph, Count:=1, Extend:=wdMove

' Format for the font example.

.Font.Bold = False

.Font.Underline = False

.Font.Name = varFont

' Enter example text(Alphabetic characters.)

.TypeText "Flygande bäckasiner söka hwila på mjuka tuvor"

' Insert a new paragraph.

.InsertParagraphAfter

' Move to the new paragraph.

.MoveDown unit:=wdParagraph, Count:=1, Extend:=wdMove

' Insert example text(Numeric characters.)

.TypeText "0123456789?$%&()[]*_-=+/<>"

' Insert two new paragraphs and move down.

.InsertParagraphAfter

.InsertParagraphAfter

.MoveDown unit:=wdParagraph, Count:=1, Extend:=wdMove

End With



Next varFont

Application.ScreenUpdating = True



End Sub


Best regards
Jenny
 

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