|
楼主 |
发表于 2024-1-9 11:02
|
显示全部楼层
Sub 字体()
On Error Resume Next
Cells.Clear
Range("A2").Select
Columns("A:A").ClearContents
Dim MyHame As String
MyName = Dir("C:\Windows\Fonts\" & "*.*")
Do While MyName <> ""
[A65536].End(xlUp).Offset(1, 0) = MyName
MyName = Dir
Loop
For i = 2 To [A65536].End(xlUp).Row
Cells(i, 2) = "中华人民共和国1234567890"
Cells(i, 3) = "ABCDEFG1234567890"
Cells(i, 2).Resize(1, 2).Font.Name = Split(Cells(i, 1).Value, ".")(0)
Next
[A1] = "字体文件名"
[B1] = "中文"
[C1] = "数字"
Cells.EntireColumn.AutoFit
Range("A1").Select
End Sub
|
|