Как получить список всех шрифтов, в виде массива — Visual Basic(Бейсик)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Private Sub GetFonts()
With Application.CommandBars("Formatting")
     If Not .FindControl(Id:=1728) Is Nothing Then
        With .FindControl(Id:=1728)
              ReDim iFonts$(1 To .ListCount)
              For iCount% = 1 To .ListCount
                  iFonts$(iCount%) = .List(iCount%)
              Next
        End With
     Else
        MsgBox "Вы удалили контрол, который содержит список всех шрифтов"
     End If
End With
End Sub

Leave a Comment