PDA

View Full Version : Automatic font samples in Word



29-03-2001, 02:14 PM
Back in earlier times WORD 6 had a macro that would automatically print out samples of all the fonts on your PC

Is there anything similar for WORD 97? (I even have a feeling that somebody at PC World wrote something similar but it didn't work)

John
Waihi

29-03-2001, 04:15 PM
The following macro will do as required.

Sub ListFonts()

' ListFonts Macro
' Created by George Campbell, PC World Magazine
Dim listFont As Variant
Application.ScreenUpdating = False
Documents.Add Template:='normal'
For Each listFont In FontNames
With Selection
.Font.Name = 'Arial'
.Font.Size = 12
.TypeText listFont
.TypeText Text:=Chr(11)
.Font.Name = listFont
.TypeText 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z'
.TypeText Text:=Chr(11)
.TypeText 'a b c d e f g h I j k l m n o p q r s t u v w x y z'
.TypeText Text:=Chr(11)
.TypeText '1 2 3 4 5 6 7 8 9 0 ! @ # $ % ^ & * ( ) + - _ = * / \ : ; ' ~ ` < , > . ? { } [ ] |'
.TypeText Text:=Chr(11)
.InsertParagraphAfter
.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdMove
End With
Next listFont
Selection.WholeStory
Selection.Sort
Selection.HomeKey Unit:=wdStory

End Sub

HTH