開通VIP,暢享免費電子書等14項超值服
首頁
好書
留言交流
下載APP
聯(lián)系客服
2017.11.02
Sub DelBlank()
Dim i As Paragraph, n As Integer
Application.ScreenUpdating = False
For Each i In ActiveDocument.Paragraphs
If Len(i.Range) = 1 Then
i.Range.Delete
n = n + 1
End If
Next
MsgBox "共刪除空白段落" & n & "個"
Application.ScreenUpdating = True
End Sub
代碼輸入完畢,單擊“工具欄”中的“運行”按鈕,執(zhí)行這段代碼。這時,會彈出一個消息窗口,告訴你一共刪除了多少空行。
微信登錄中...請勿關(guān)閉此頁面