Sub 删除所有空格()
Selection.WholeStory
Selection.Find.Execute findtext:="^w", MatchWildcards:=False, Format:=False, ReplaceWith:="", Replace:=wdReplaceAll
Selection.Find.Execute findtext:=" ", MatchWildcards:=False, Format:=False, ReplaceWith:="", Replace:=wdReplaceAll
End Sub
Sub 删除段落首尾空格()
Selection.WholeStory
CommandBars.FindControl(ID:=122).Execute
CommandBars.FindControl(ID:=123).Execute
End Sub
Sub 删除空行()
Dim i As Paragraph
For Each i In ActiveDocument.Paragraphs
If Len(i.Range) = 1 Then i.Range.Delete
Next
End Sub
|