Microsoft Word ==================================== 选择全部表格宏 --------------------------------- .. code-block:: vbscript Sub SelectAllTables() ' ' SelectAllTables Macro ' ' Dim T As Table Application.ScreenUpdating = False ActiveDocument.DeleteAllEditableRanges wdEditorEveryone For Each T In ActiveDocument.Tables T.Range.Editors.Add wdEditorEveryone Next ActiveDocument.SelectAllEditableRanges wdEditorEveryone ActiveDocument.DeleteAllEditableRanges wdEditorEveryone Application.ScreenUpdating = True End Sub