+ -
当前位置:首页 → 问答吧 → 文档中夹杂着很多表格,如何快速选中所有表格?

文档中夹杂着很多表格,如何快速选中所有表格?

时间:2011-07-15

来源:互联网

文档中夹杂着很多表格,如何快速选中所有表格?

作者: killreins   发布时间: 2011-07-15

选定所有表格的宏

Sub SelectAllTable()

Dim tempTable As Table
Application.ScreenUpdating = False
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

作者: szqhb   发布时间: 2011-07-15