Showing All Fonts

Ste_Moore01

Active Member
Joined
Jul 13, 2005
Messages
467
Hi guys,

Is there a way that we can make a macro that puts a word in column A with each font that is loaded on the computer?

I could do this manually but it takes ages and is very tedious.

Can anyone help me?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Try (adapted from Chip Pearson's Symbolizer Add-In):

Code:
Sub ListFonts()
    Dim Ctrl As CommandBarComboBox
    Dim Sh As Worksheet
    Dim F As Long
    Set Ctrl = Application.CommandBars.FindControl(ID:=1728)
    If Not Ctrl Is Nothing Then
        Set Sh = Worksheets.Add
        For F = 1 To Ctrl.ListCount
            Sh.Cells(F, 1) = Ctrl.List(F)
        Next F
    End If
End Sub
 

Ste_Moore01

Active Member
Joined
Jul 13, 2005
Messages
467
That wasn't exactly what I was after but it's helped me to do what I wanted.

Thanks Andrew!
 

DominicB

Well-known Member
Joined
Oct 3, 2005
Messages
1,569
Good morning Ste_Moore01

Is there a way that we can make a macro that puts a word in column A with each font that is loaded on the computer?

Not quite sure I follow exactly what you mean, but does this help :

Code:
Sub ShowFonts()
Set AllFonts = Application.CommandBars("Formatting").FindControl(ID:=1728)
Range("A:A").ClearContents
For n = 0 To AllFonts.ListCount - 1
Cells(n + 1, 1) = "Hello"
Next n
End Sub

For this to work your Formatting toolbar must contain the font control.

HTH

DominicB
 

Forum statistics

Threads
1,140,913
Messages
5,703,141
Members
421,278
Latest member
16cwilliams

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top