7 Find and Replace Text

 <  Day Day Up  >  

Long documents make locating what you need quickly important. Perhaps you need to make changes to some text in a table or perhaps a caption is wrong on a figure. Writer provides text-locating tools that will be familiar to you if you've done similar text-locating tasks in the past.

Before You Begin

3 Open an Existing Document

5 Edit Text

6 Move Around a Document

Of course, along with finding text, you'll need to replace the text you find sometimes. For example, you may have written a letter to Kim McDonald and learned that her name is Kim MacDonald before you mailed the letter. With Writer's Find and Replace tools, you can make quick work of changing all the McDonald references to MacDonald throughout the document. Whether the document is one page or 100 pages, you'll be able to find and replace text such as this just as quickly and easily.

See Also

12 Apply Character Formatting



The Navigator and Navigation floating toolbars are great for locating generic elements within your document, but use the Find and Replace tools, shown in this task, to locate specific text and editing marks within your document.

  1. Find Text

    Select the Find & Replace option from the Edit menu to display the Find & Replace dialog box. You can also long-click the Find Main toolbar button or press Ctrl+F to display the Find & Replace dialog box.

  2. Enter Search Text

    Type the text you want to find in the Search for text box.



    If you've searched for the same text before, you can click the down arrow to open the Search for drop-down list box and select the text to search for it once again.

  3. Start a Search

    Click the Find button. Writer searches from the current text cursor's position in the document to the end of the file. If Writer finds the text, it highlights the text. You may be able to see the highlighted text, but if not you can move or close the Find & Replace dialog box to see the highlighted text. (If you had clicked the Find All button instead of Find , Writer would have highlighted all occurrences of any matching text in the document.)

  4. Type Replacement Text

    If you want Writer to replace found text with new text, type the new text into the Replace with text box.

  5. Replace the Text

    If the Search for text is found, Writer replaces that text with the text you entered in the Replace with text box.

  6. Replace All Occurrences

    Instead of Replace (or after you do a replacement), if you click the Replace All button, Writer replaces all the matches with your replacement text throughout the document. Such a change is more global and possibly riskier because you may replace text you didn't really want replaced . By clicking Find before each replace operation, you can be sure that the proper text is being replaced; however, such a single-occurrence find and replacement takes a lot of time in a long document.

  7. Replace All Previous Matches

    Click to select the Backwards option before doing a find or replacement if you want to find or replace from the current text cursor's position back to the start of the document.

  8. Search with Wildcards

    Click to select the Regular expressions option if you want to perform a wildcard search using OpenOffice.org's regular expressions . Table 2.3 describes some of the more common regular expressions you may use in Writer and gives an example of each.

    Table 2.3. Regular Expressions That Form Advanced Wildcard Searches

    Regular Expression Character

    How Used


    Represents one and only one character in a search. Therefore, h.s matches his and has but not hands (similar to the question mark wildcard character in other programs).


    Requests that a match be made only if the search term appears at the beginning of a paragraph. Therefore, ^The matches all occurrences of The that begin paragraphs, but it does not match any other The in the document.


    Requests that a match be made only if the search term appears at the end of a paragraph. Therefore, success$ matches all occurrences of success that fall at the end of paragraphs, but it does not match any other success in the document.


    Represents zero, one, or more characters . Therefore, i*n matches in, i123n , and ion .

    \ >

    Represents a search term located at the end of a word. Therefore, \ >door matches outdoor and indoor but not doorknob .

    \ <

    Represents a search term located at the beginning of a word. Therefore, \ <door matches doorknob but not outdoor and indoor .


    Locates empty paragraphs.



    Wildcard search ” Allows you to use wildcard characters, such as *, to replace characters in a search.

    Regular expressions ” The name given to OpenOffice.org's extensive wildcard character support; OpenOffice.org supports far more wildcard characters than most Windows programs.

  9. Search for Formatted Text

    If you want to search only for certain text values that are formatted in a particular way, such as all italicized instances of McDonald but not boldfaced instances of McDonald, you can do so by clicking the Format button to display the Text Format (Search) dialog box.

  10. Specify a Font to Find

    Select the font name, typeface, and size that the text much match before being considered found.

  11. Search for a Font Effect

    If you want to further refine your search to a specific font color or effect, click the Font Effects tab to display a page with those attributes you can look for.

  12. Choose a Font Effect

    Select the font effect you want to find. If the matching text also matches the font effects you select (as well as any font name and size you may have selected in step 10), Writer considers the match to be successful and highlights the found text.



    Click the tabs on the other pages within the Text Format (Search) dialog box to see the other refinements you can make when searching and replacing text. You can even specify the background color that must appear behind any matching text before the text is to be considered a match.

    When you finish finding and replacing all the text for this search session, click the Find & Replace dialog box's Close button to close the dialog box and return to the document's work area.

 <  Day Day Up  >  

Sams Teach Yourself OpenOffice.org All In One
Sams Teach Yourself OpenOffice.org All In One
ISBN: 0672326183
EAN: 2147483647
Year: 2003
Pages: 205
Authors: Greg Perry

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net