If this is MS Word, then use this AppleScript, which I copied from here, page 119:
ftp://ftp.mactech.com/pri/article-submissions/07-ArticleGalleysToReview/!Archived%20Files/old%20versions%20of%20VBA%20guide/23.04%20VBA-Chapter%203.pdf
(FTP links don’t seem to work here.)
Delete Empty Lines (MS Word).kmmacros (3.2 KB)