复制下列代码: Sub 批量修改表格() Dim tempTable As Table Application.ScreenUpdating = False If ActiveDocument.ProtectionType = wdAllowOnlyFormFields Then MsgBox '文档已保护,此时不能选中多个表格!' Exit Sub End If 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 2、修改样式。运行我们刚刚录入进去的宏,即可一次选中文档中所有表格,此时,我们在「设计」-「表格样式」-「修改表格样式」,在这里面我们可以随意的设置表格中内容的格式样式。 3、表格属性。不仅如此,我们还能够通过「右键」-「表格属性」,进入后,我们可以对其中单元格的高度、宽度等再次统一设置。 |
|