![]() |
|
|
|
#1
|
|||
|
|||
|
I want to compare a number of different fonts by printing the same one-page document in each of the fonts. As a way of labelling the documents, I would like to show the font name on each one. I thought of a footer with a field for the font name. However, there seems to be no such field.
Can anyone suggest a way to achieve what I want? |
|
#2
|
||||
|
||||
|
The following macro, originally published by MS, will print a list of all installed fonts, including the same sample text for each. You could modify the '.InsertAfter' string to include some representative boilerplate text - even including a page break so that each font is output to a new page. The macro could also be modified to employ only a designated set of fonts.
Code:
Sub ListFonts()
Application.ScreenUpdating = False
Dim ListFont As Variant
With ActiveDocument.Characters
For Each ListFont In FontNames
With .Last
.Font.Name = "Arial"
.Font.Size = 12
.Text = ListFont & Chr(11)
End With
With .Last
.Font.Name = ListFont
.InsertAfter "ABCDEFGHIJKLMNOPQRSTUVWXYZ ~!@#$%^&*()_+|<>?:{}" & Chr(11) & _
"abcdefghijklmnopqrstuvwxyz `1234567890-=\,.;'[]" & vbCr
End With
With .Last
.Font.Name = "Arial"
.InsertAfter vbCr
End With
Next ListFont
End With
Application.ScreenUpdating = True
End Sub
For Mac macro installation & usage instructions, see: https://wordmvp.com/Mac/InstallMacro.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How to set font size in text-input field of protected form
|
UnicornVestibule | Word | 5 | 06-06-2016 10:51 PM |
Looping Macro to Change Font, Font Size, and Give Heading 1
|
WH7262 | Word VBA | 1 | 08-26-2014 03:46 PM |
Unable to format field font - HELP!
|
smarsh | Mail Merge | 3 | 06-18-2014 03:56 PM |
| Using Quick Parts >> Ref >> Field (Third word changing font) | sonny49 | Word | 1 | 01-07-2014 10:01 AM |
| Editing the font of text inserted before a merge field | clawschieff | Mail Merge | 6 | 03-19-2013 07:13 AM |