Removing double empty lines (two 0x0a 0x0a in a row)
Posted
by Raul Sobon
on February 1st, 1999
PURPOSE: To remove double empty lines (two 0x0a 0x0a in a row)
WHY: When converting from mac/unix/dos text file formats some programs stuff up by making double lines which is annoying
HOW: Just mark your area and run the macro
Sub RemEmptyLines() Dim comp str = ActiveDocument.Selection.Text str1 = "" comp = vbLf + vbLf comp2 = vbLf + vbLf i = 1 Do While (i < Len(str)+1) Do While Mid(str, i, 2) = comp i = i + 1 Loop str1 = str1 + Mid(str, i, 1) i = i + 1 Loop ActiveDocument.Selection.Text = str1 End Sub
Date Last Updated: February 1, 1999

Comments
nice example
Posted by Legacy on 07/06/2002 12:00amOriginally posted by: kirankumar
Nice, but i want paragraph funcations any examples is there please infoam my mail id
my problem is starting of document to space finishing of the file two spaces.
Replyplease sir
your friend
Nice, but destroys the nice formatting
Posted by Legacy on 05/11/1999 12:00amOriginally posted by: Yonat
Reply