选择视图-宏代码
输入宏名字【SelectAllEquations】,选择加号,添加宏代码
输入宏代码,并保存,然后关闭:
Sub SelectAllEquations()
Dim xMath As OMath
Dim I As Integer
With ActiveDocument
.DeleteAllEditableRanges wdEditorEveryone
For Each xPara In .Paragraphs
For I = 1 To xPara.Range.OMaths.Count
Set xMath = xPara.Range.OMaths.Item(I)
xMath.Range.Editors.Add wdEditorEveryone
Next
Next
.SelectAllEditableRanges wdEditorEveryone
.DeleteAllEditableRanges wdEditorEveryone
End With
End Sub
再点开宏代码,选择刚才添加的宏代码,点击运行
选择所有表格同理,代码名字变成【SelectAllTables】,宏代码如下:
Sub SelectAllTables()
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