无码av一区二区三区无码,在线观看老湿视频福利,日韩经典三级片,成 人色 网 站 欧美大片在线观看

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

Word:利用宏批量選中Word表格VBA代碼

2021-01-25 18:44 作者:北阪有桑123  | 我要投稿

Sub SelectAllTables()


? ? Dim tempTable As Table

? ??

? ? Application.ScreenUpdating = False

? ??

? ? '判斷文檔是否被保護

? ? If ActiveDocument.ProtectionType = wdAllowOnlyFormFields Then

? ? ? ? MsgBox "文檔已保護,此時不能選中多個表格!"

? ? ? ? Exit Sub

? ? End If

? ? '刪除所有可編輯的區(qū)域

? ? ActiveDocument.DeleteAllEditableRanges wdEditorEveryone

? ? '添加可編輯區(qū)域

? ? For Each tempTable In ActiveDocument.Tables

? ? ? ? tempTable.Range.Editors.Add wdEditorEveryone

? ? Next

? ? '選中所有可編輯區(qū)域

? ? ActiveDocument.SelectAllEditableRanges wdEditorEveryone

? ? '刪除所有可編輯的區(qū)域

? ? ActiveDocument.DeleteAllEditableRanges wdEditorEveryone

? ??

? ? Application.ScreenUpdating = True

? ??

End Sub


Word:利用宏批量選中Word表格VBA代碼的評論 (共 條)

分享到微博請遵守國家法律
天门市| 德州市| 宁晋县| 绥中县| 桑植县| 肥西县| 长泰县| 晋宁县| 新丰县| 高邮市| 明星| 江安县| 寻乌县| 肥乡县| 康定县| 屏南县| 琼中| 榆林市| 沂源县| 金平| 广饶县| 奉节县| 山阴县| 中方县| 苏州市| 谢通门县| 阳信县| 洛浦县| 肇源县| 巫溪县| 茂名市| 沙田区| 新民市| 漯河市| 宜宾市| 奎屯市| 正镶白旗| 海阳市| 清远市| 泸西县| 军事|