bottom
Great WordTips!
         
Your e-mail address is safe!
Close Note

Tips.Net > WordTips Home > Editing > Removing Extra Paragraph Marks with WordBasic

Removing Extra Paragraph Marks with WordBasic

Summary: Use this handy WordBasic macro to quickly remove extra paragraph marks from a document. (This tip works with Microsoft Word 6, and Word 95.)

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 MAIN
EditFindClearFormatting
EditReplaceClearFormatting
StartOfDocument
EditFind .Find = "^p^p", .WholeWord = 0, .MatchCase = 0, \
.Direction = 1, .Format = 0
While EditFindFound()
    CharRight
    EditClear - 1
    CharLeft 2
    RepeatFind
Wend
End Sub

Tip #997 applies to Microsoft Word versions: 6 | 95


Great Idea! Word is a tool to get what you really want—printed output. This means you need to make sure that Word works as well as possible with your printer, whether it is sitting on your desk or in a room down the hall.
 
Check out WordTips: Printing and Printers today!

Helpful Links

Ask a Word Question
Make a Comment

Tips.Net Home
Vital News Home

WordTips FAQ
WordTips Premium

Learn Access Now

Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 Tips
WordTips

Advertise on the
WordTips Site

 

Great Info!

Get tips like this every week in WordTips, a free productivity newsletter. Enter your e-mail address and click "Subscribe."
     
(Your e-mail address will never be shared with anyone, ever.)