使用VBA宏批量修改表格

一、批量修改表格,实现所有表格的宽度根据窗口自动调整。

Sub test()
'
' test 宏
'
'
Dim i As Table, N As Integer
On Error Resume Next
For Each i In ActiveDocument.Tables
i.AutoFitBehavior (wdAutoFitWindow)
Next i
Application.ScreenUpdating = True

End Sub
原文地址:https://www.cnblogs.com/tinaluo/p/7474233.html