word 2007如何批量禁止 跨页断行?或者用vbs宏批量操作禁止表格跨页断行?

如题所述

在word中,按Alt+F8→创建→名称写“SelectAllTables”→在编辑框里输入最下列内容(不含开始和结尾的双引号),然后保存。

然后在你想要批量修改的word里,按Alt+F8,运行刚刚创建的宏,就把这个word里所有表格都选中了,再右键属性,就可以修改了(PS:如果word中表格比较多,在点完运行后,可能会卡一会,稍等即可)。

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
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答