Macro to delete empty paragraph marks is also deleting section breaks
Posted on 2004-04-30
I am trying to get rid of extra paragraph marks in a Word document. I have a macro that will delete all the empty paragraph marks in the document, but the problem is that it also deletes section breaks if they are right above the empty paragraph mark.
Is there a way to change the macro so that only the paragraph marks are deleted, not the section breaks above them?
Here's my code:
' Delete all empty paragraphs
For Each currPara In ActiveDocument.Paragraphs
If Len(Trim$(currPara.Range.Text)) = 1 Then