|
遍历所有表格,将所有表格后增加一个空段,最后再以下为去除表格后空段,迂回一下,
====================================================
Sub d1()
Rem 所有表格后增加一个空段
For Each Tbl In ActiveDocument.Tables
Set tempRange = ActiveDocument.Range(Tbl.Range.End, Tbl.Range.End)
tempRange.InsertAfter Chr(13)
Next
With ActiveDocument.Content.Find
Do While .Execute("[^13|^9][0-9]@[\..、]", , , 1)
'换成 .Execute("[^13|^9][0-9]@[\..、]", , , 1)也不也行
'换成 .Execute("[^13|^7][0-9]@[\..、]", , , 1)更出问题
n = n + 1
With .Parent
.MoveStart 1, 1
.Text = n & "."
.Font.Name = "Arial Black"
.Font.ColorIndex = 6
.Collapse
End With
Loop
End With
Rem **以下为去除表格后空段**
For Each Tbl In ActiveDocument.Tables
Set tempRange = Tbl.Range
tempRange.Collapse 0
tempRange.Delete
Next
End Sub
|
|