1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
Dim I As Integer
Documents.Open FileName:="D:\test.doc", ConfirmConversions:=False, ReadOnly:= _
False, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:= _
"", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="", _
Format:=wdOpenFormatAuto, XMLTransform:="", DocumentDirection:= _
wdLeftToRight
Selection.HomeKey Unit:=wdStory
For I = 1 To 30
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
If ((Selection.Text) = "") Then Selection.Delete Unit:=wdCharacter, Count:=1
Selection.Next
Next |
Partager