Excel 求助,WORD怎样批量将虚框变回实框

2025-06-21 16:19:54
推荐回答(1个)
回答1:

请参考:
Sub example()
Application.ScreenUpdating = False
With Application.FileSearch
.LookIn = "D:\myfloder" '这里改成你自己的目录,或者使用inputbox
.FileType = msoFileTypeWordDocuments
If .Execute > 0 Then
For i = 1 To .FoundFiles.Count
Set myDoc = Documents.Open(FileName:=.FoundFiles(i), Visible:=False)
For Each t In myDoc.Tables
t.Style = "网格型"
Next
myDoc.Close True
Next
End If
End With
Application.ScreenUpdating = True
End Sub