word一次选中所有表格
step one :
ALT+F8创建宏
Step two:
将代码粘贴进编辑器,直接覆盖编辑器中原有代码
Sub 全选所有表格()
Dim t As Table
an = MsgBox("即将选择选区内所有表格,若无选区,则选择全文表格。", vbYesNo, "鱼腹酱提醒您")
If an - 6 Then Exit Sub
Set rg = IIf(Selection.Type = wdSelectionIP, ActiveDocument.Content, Selection.Range)
ActiveDocument.DeleteAllEditableRanges wdEditorEveryone
For Each t In rg.Tables
t.Range.Editors.Add wdEditorEveryone
Next
ActiveDocument.SelectAllEditableRanges wdEditorEveryone
ActiveDocument.DeleteAllEditableRanges wdEditorEveryone
End Sub
Step three:
点击运行后,在word中就选中了所有表格。
Step four:
将宏保存在所有活动模板和文档中,这样,其他word文件也可以直接使用“选中所有表格的宏”。
WPS选中所有表格
WPS中需要下载VBA插件,后续操作同Word。