|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub 删除段落首尾空格及空行()
With ActiveDocument.Content.Find
.Execute findtext:="^l", replacewith:="^p", Replace:=wdReplaceAll
.Execute findtext:="^13", replacewith:="^p", Replace:=wdReplaceAll
.Execute findtext:="(", replacewith:="(", Replace:=wdReplaceAll
.Execute findtext:=")", replacewith:=")", Replace:=wdReplaceAll
End With
SendKeys "^(aej)", True
Dim i As Paragraph
For Each i In ActiveDocument.Paragraphs
If Len(i.Range) = 1 Then i.Range.Delete
Next
End Sub |
|