搜索打开Visual Basic
VBA 编辑器→插入→模块
粘贴以下内容:
Sub 批量选择所有表格()
Dim tempTable As Table
Application.ScreenUpdating = False
If ActiveDocument.ProtectionType = wdAllowOnlyFormFields Then
MsgBox "文档已保护,此时不能选中多个表格!"
Exit Sub
End If
ActiveDocument.DeleteAllEditableRanges wdEditorEveryone
For Each tempTable In ActiveDocument.Tables
tempTable.Range.Editors.Add wdEditorEveryone
Next
ActiveDocument.SelectAllEditableRanges wdEditorEveryone
ActiveDocument.DeleteAllEditableRanges wdEditorEveryone
Application.ScreenUpdating = True
End Sub
单击运行子过程/用户窗体
按钮
关闭 VBA 编辑器,Microsoft Word 中设置表格属性