Searching and replacing in the script editor

<< Click to Display Table of Contents >>

Searching and replacing in the script editor

The ribbon commands Home | Search and Home | Replace allow you to search for a specific text in the script or replace it with another text.

Search

With the ribbon command Home | Search, you can search for text. Type in the term you want to search and click the Search button.

Options available in the Search dialog box:

Case sensitive: If this option is checked, the case of the letters in the found text must be the same as the search term. Thus, if you search for "Print", only "Print would be found and not "print" or "PRINT".

Whole words only: If checked, only those occurrences of the search term that are separate words (not just part of a word) will be found.

Search from top: If checked, the search starts at the top of the script instead of the current position of the text cursor.

Search Backwards: If checked, the search is conducted from the position of the text cursor backwards to the top of the script, otherwise forwards.

Reset: Use this button to remove the search text entered in the dialog box.

Replace

With the ribbon command Home | Replace, you can search for text and replace it with different text.

Enter the search string and the replacement string.

Options: see above

Start the search with the Search button. When the script editor finds the searched text, it scrolls to its position in the document and selects it.

You can then do any of the following:

A.You can click on Replace to have the editor replace the selected occurrence of the search term with the replacement term and jump to the next occurrence of the search term.

B.You can click on Search again to have the editor jump to the next occurrence of the search term – without replacing the selected occurrence.

C.You can click on Replace all to have the editor replace the selected occurrence of the search term and all subsequent occurrences it finds in the text.

D.You can click on Close to end the search and close the search dialog box.

Search again

With the ribbon command Home | Search again, you can repeat the last search or replacement action.