Journal of Accountancy Large Logo
ShareThis
|
TECHNOLOGY Q&A

Give me a break

 

By J. Carlton Collins
May 2012

Q: We receive large text documents each week that contain paragraph breaks at the end of each line, and we must manually remove the breaks to incorporate this text into our websites and reports. Removing these breaks manually is time-consuming, and using the Find and Replace tool doesn’t work well because this approach removes all of the document’s breaks (even the ones we want), which takes even longer to correct. Can you suggest a quick and easy way to remove the unwanted line breaks?

A: The easiest way to remove unwanted line breaks is to press Alt+Ctrl+K. This keystroke combination runs Word’s AutoFormat command, which analyzes the document and instantly applies an appropriate format, which includes removing unnecessary line breaks. (Because you might use this tool frequently, you should consider adding the AutoFormat tool to your Quick Access Toolbar for easy access.)

However, depending on the document, AutoFormat may delete (or alter) formatting that you wanted to keep. In this case, you are on the right track using the search-and-replace method as you described. You just need to add two small steps to your procedure to obtain the desired results. If you look closely, you will see that your document contains single paragraph breaks where you don’t want them, and double paragraph breaks where you do. The trick is to get rid of the single breaks you don’t want but keep the double breaks you do. Start by replacing the double paragraph breaks (which you want to keep) with an uncommon string of text that does not appear in the document, such as 5555, as follows. From the Office 2010 or 2007 Home tab, select Editing, Replace to launch the Find and Replace dialog box (shown below). From the Office 2003 menu, select Edit, Replace to launch the Find and Replace dialog box. Then, in the Find what box, type ^p^p, and in the Replace with box, type 5555, as shown.

Click Replace All. Next, use Find and Replace again to remove all single paragraph breaks (which you don’t want) as follows: From the Home tab, select Editing, Replace and type ^p in the Find what box and enter a space in the Replace with box, then click the Replace All button (this action will replace each paragraph break in your document with a space). Finally, restore the double paragraph breaks as follows: From the Home tab, select Editing, Replace and type 5555 in the Find what box and ^p^p in the Replace with box, then click Replace All. The resulting document will be devoid of the unwanted paragraph breaks, and you will be able to copy, paste, and edit the text unencumbered by unwanted line breaks.

View CommentsView Comments   |  
Add CommentsAdd Comment   |   ShareThis
CPE Direct articles Web-exclusive content
AICPA Logo Copyright © 2013 American Institute of Certified Public Accountants. All rights reserved.
Reliable. Resourceful. Respected. (Tagline)