宏批量修改word表格为自适应宽度

Freeder
阅读 322
Sub 批量修改表格为自适应宽度()
'
' 批量修改表格为自适应宽度 宏
'
'
Dim tempTable As Table

    Application.ScreenUpdating = False

    If ActiveDocument.ProtectionType = wdAllowOnlyFormFields Then

        MsgBox "文档已保护,此时不能选中多个表格!"

        Exit Sub

    End If


    For Each tempTable In ActiveDocument.Tables

        tempTable.AutoFitBehavior (wdAutoFitWindow)

    Next
End Sub
回到顶部