Name

Edit Replace

Synopsis

The Replace command is very similar to the Find command except that, in addition to finding the next occurrence of a specified text, Word also replaces it with a new entry. The dialog box that opens (Figure 5-6) is actually the same Find and Replace dialog box used for the Find command, just a different tab. Enter the text to find in the “Find what” box and enter the text to replace it with in the “Replace with” box. The Replace button replaces the currently selected occurrence of the text and finds and selects the next one. Replace All replaces all found occurrences of the text throughout the document. Find Next jumps to the next occurrence and selects it without replacing the currently selected one. All of the advanced search options are identical to those used with the Find command.

Use Special Characters in the Replace Dialog

Here’s a great example of the usefulness of the Replace command. Say you open a file formatted as plain text (ASCII) with line breaks in Word and want to remove the line breaks. You can simply replace the line breaks with spaces by using Word’s Replace command to replace all instances of ^p (the code for a line break) with spaces. If you have double line breaks, use ^p^p instead. Find a list of special characters used in Word in Appendix B.

Replacing text in a document

Figure 5-6. Replacing text in a document

Warning

Be careful using Replace All. Remember ...

Get Word 2000 in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.