用萬能的VBA可以實現。
程式碼如下:
Public Sub 更改字型()
Dim fs, f, f1, fc, s
MyPath = "g:\TEST" ‘這是存放檔案的目錄,根據需要可以更改
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(MyPath)
Set fc = f.Files
i = 1
For Each f1 In fc
MyName = f1.Name
Workbooks.Open (MyPath & "\" & MyName)
For Each mys In ActiveWorkbook.Sheets
Cells.Select
With Selection.Font
.Name = "仿宋" ’將字型設定為仿宋,也可以根據需要更改
End With
Next
ActiveWorkbook.Close
End Sub
用萬能的VBA可以實現。
程式碼如下:
Public Sub 更改字型()
Dim fs, f, f1, fc, s
MyPath = "g:\TEST" ‘這是存放檔案的目錄,根據需要可以更改
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(MyPath)
Set fc = f.Files
i = 1
For Each f1 In fc
MyName = f1.Name
Workbooks.Open (MyPath & "\" & MyName)
For Each mys In ActiveWorkbook.Sheets
Cells.Select
With Selection.Font
.Name = "仿宋" ’將字型設定為仿宋,也可以根據需要更改
End With
Next
ActiveWorkbook.Close
Next
End Sub