『Alt+F11』開啟Microsoft Visual Basic,『插入→模組』右側空白處貼上
巨集是儲存在該word檔,執行巨集執行即可。
Sub 刪除表格空列()
Dim aTable As Table, aRow As Row
Application.ScreenUpdating = False
For Each aTable In ActiveDocument.Tables
For Each aRow In aTable.Rows
If Len(aRow.Range) < aRow.Cells.Count * 2 + 3 Then aRow.Delete
Next
Next
Application.ScreenUpdating = True
End Sub
0 意見:
張貼留言