
Tips.Net > WordTips Home > Editing > Removing Extra Paragraph Marks
Summary: Part of working with other people’s documents is cleaning them up so that they are easier to maintain and format. One common task is removing extra paragraph marks in the document. The macro in this tip makes short work of removing all the extra paragraph marks. (This tip works with Microsoft Word 97, Word 2000, Word 2002, and Word 2003.)
There may be times when you are working with a document when you have a need to remove extra paragraph marks. This is particularly true if you are working with an ASCII file or a file that may have originally been formatted with another word processor. This process of manually removing extra paragraph marks can be very time consuming.
If you find yourself in this situation, you may find this macro of interest. It removes extra paragraph marks from a document. When it is completed, there should not be even two paragraph marks in a row in your document.
Sub ReplacePara()
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.Text = "^p^p"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
While Selection.Find.Found
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeBackspace
Selection.MoveLeft Unit:=wdCharacter, Count:=2
Selection.Find.Execute
Wend
End Sub
Tip #998 applies to Microsoft Word versions: 97 2000 2002 2003
Step Up and Take Control! Subscribers to WordTips know just how valuable a resource it is. WordTips Premium provides twice the number of exceptional, easy-to-understand tips every week in an ad-free newsletter, as well as substantial discounts on WordTips archives and e-books.
Check out WordTips Premium today!
If you provide support and help to others, you need the power offered in the WordTips Ten-Year Library. There is no better information repository anywhere! (more information...)
Ask a Word Question
Make a Comment
Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Word2007 Tips
WordTips