1. Sub 批量选中文档中所有表格()
    2. Dim tempTable As Table
    3. Application.ScreenUpdating = False
    4. If ActiveDocument.ProtectionType = wdAllowOnlyFormFields Then
    5. MsgBox "文档已保护,此时不能选中多个表格!"
    6. Exit Sub
    7. End If
    8. ActiveDocument.DeleteAllEditableRanges wdEditorEveryone
    9. For Each tempTable In ActiveDocument.Tables
    10. tempTable.Range.Editors.Add wdEditorEveryone
    11. Next
    12. ActiveDocument.SelectAllEditableRanges wdEditorEveryone
    13. ActiveDocument.DeleteAllEditableRanges wdEditorEveryone
    14. Application.ScreenUpdating = True
    15. End Sub