Word VBA Macro – Sample of a string for each font installed
22nd September, 2008 – 11:45 amOccassionally I need a quick and dirty look at what a string will look like in various fonts.
I use this (quite hacky) VBA macro. Be warned it can take a while to run on older systems – SAVE YOUR OPEN WORD DOCS FIRST!
Sub SampleFonts()‘ Output a text string in each font intalled on the system
‘ Steve Morgan, www.stevemorgan.me.uk 22/09/2008
Dim fnt As Variant
Dim strOut As String
‘ Change this to change outputted string!
strOut = “My Sample Text”
For Each fnt In Application.FontNames
‘ MsgBox fnt
Selection.Font.Name = fnt
Selection.TypeText (strOut + vbTab + vbTab + fnt) + vbCrLf
Next
End Sub
2 Responses to “Word VBA Macro – Sample of a string for each font installed”
This is a test comment after enabling the SpamFree plug in
By Steve Morgan on Nov 15, 2008
test – great post though. Thanks .
By Steve Morgan on Jun 16, 2009