Sub 单表空白格填充() Dim CK1, CK2 AsBoolean Dim aCell As Cell With Selection.Tables(1) ForEach aCell In .Range.Cells aCell.Select CK1 = (Selection.Range.ListFormat.ListString = "") CK2 = (Selection.Text = (Chr(13) & Chr(7))) If CK1 And CK2 Then Selection.Text = "-" EndIf Next EndWith EndSub
全部表空白格填充
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Sub 全部表空白格填充() Dim CK1, CK2 AsBoolean Dim aCell As Cell ForEach tempTable In ActiveDocument.Tables With tempTable ForEach aCell In .Range.Cells aCell.Select CK1 = (Selection.Range.ListFormat.ListString = "") CK2 = (Selection.Text = (Chr(13) & Chr(7))) If CK1 And CK2 Then Selection.Text = "-" EndIf Next aCell EndWith Next tempTable EndSub