How to Map FindNext and FindPrevious to F3 and Shift+F3 in Microsoft Office 2007

Preface

You must have been using the search feature (Search) in Microsoft Word. If not, it is time to try, hehe … To display the Search form, usually you press Alt + E + F, or Ctrl + F on your keyboard. After that, you type in keywords to search, then pressing the Find Next button on the Search dialog box to start searching. If found, we usually repeat the process by pressing the Find Next to find whether the keyword was still found at the other locations on the Word file. So forth, every time you want to find whether there is data that is found, then you should press the Find Next button in the Search dialog box.

Problems

The problem is, if the keywords that you are looking for was found either in more than one location or page, then you should replace that word that was found earlier with the other words that should not be the same each time you replace or change it (depending on the circumstances and context in which the word is resides), more often you will get annoyed as well. Why? Since you will be a little bothered with the job switching between the windows; from the Search dialog box to the Microsoft Word windows page and vice versa, in order to find and change the words that are found. In addition, the Search dialog box window area that often obstruct and interfere with your view to see the words found on page Microsoft Word.

Ouw, ya, just to focus the discussion on this post, in this case, we ignore the Replace All functions in the Search dialog box. Why? Because the Replace All feature will overwrite all the words that match with the search criteria, but unfortunately, we often do not want that will be happened. If you are not carefully using this Replace All, then you should not want it to be overwritten (because it is not that simple to replace all the words contained in sentences), will actually just hit with the new data. As a result, there is some context that would be chaotic.

Back to the topic! Usually after you press the Find Next button, you have to move your mouse cursor from the Search dialog box to the last page Microsoft Word file you open, then edit or replace the data you found before. After that, you return back again to the Search dialog box, then click on the Find Next button again to find if there were any data is found or not. So forth, until the last word is found. The question is: Is there a way more fun and easy to do this job?

Solution

No need to worry anymore, because there was a technique so you do not always have to move from the Search dialog box to the pages of Word and vice versa. In this case we will try to mapping search function next (FindNext) to the shortcut key F3, as well as adding a search function to the previous word (FindPrevious) then mapping it to the shortcut keys Shift + F3.

All rigth, then. Let’s get started. Please follow the steps below.

  1. Open one of your Microsoft Word 2007 files.
  2. Make sure at the top of menu, it has a Developer tab menu appears.
  3. If the Developer tab menu is not there, then you can display it in the following way (skip this step if that Developer tab menu has appeared at the top of your Word application):
    • Click on the Office Button at the left top of Word 2007, and then click on Word Options button to display the Word Options dialog box.
    • Make sure on the left side, the Popular item has been selected.
    • Next, give a check mark on the Show Developer tab in the Ribbon that sits at the Top options for working with Word section.
    • Click on OK button.
    • Now in the window of Microsoft Word 2007 you should have a new menu tab appears next to the far right called Developer.
  4. Now make sure you have selected the Developer tab menu.
  5. Click on the Macros sub menu, and wait until Macros dialog box appears.
  6. On the Macro name: section, type the macro name, for example: MyMacro (the Macro name cannot contains space), then click on Create button.
  7. Next, there is a window named Microsoft Visual Basic appears, and in the right pane you will see the code like Sub MyMacro etc …, remove all that code, then copy-paste the following code into the code editor window is empty:
    Sub FindNext()  
        DoFind True
    End Sub

    Sub FindPrevious()
        DoFind False
    End Sub

    Sub DoFind(findDirection As Boolean)
        Selection.Find.Forward = findDirection
        Selection.Find.Execute
        If Selection.Find.Found = False Then
            MsgBox "Microsoft Word has finished found data you were looking for.", vbInformation, "Finish"
        End If
    End Sub
  8. Click on the disk icon in order to save the code, then close the Microsoft Visual Basic window.
  9. Now make sure you have already displayed Microsoft Word 2007 window that the first time you had opened.
  10. Click on the Office Button icon that sits on top left of Microsoft Word 2007 window, then click on Word Options button.
  11. On the Word Options window, click on Customize menu, and then click on Customize … button that located at the right side of the Keyboard shortcuts: text.
  12. Next, there will be a Customize Keyboard dialog box appears, and in the Categories: section, choose Macros, and make sure in the right of that list (Macros) you have seen two items: FindNext and FindPrevious.
  13. Click on the FindNext item, and then click on the textbox Press new shortcut key: below, and press F3 button on your keyboard, then you will see the value of that textbox is F3.
  14. Click on the Assign button in order to map the FindNext function with the F3 shortcut button.
  15. Next, again click on the FindPrevious item, and then click on the textbox Press new shortcut key: below, and press Shift+F3 button on your keyboard, then you will see the value of that textbox is Shift+F3.
  16. Click on the Assign button in order to map the FindPrevious function with the Shift+F3 shortcut button.
  17. Press the Close button to close Customize Keyboard dialog box, and then click again on the OK button in order to close the Word Options dialog box window.
  18. Now you should go back to the Microsoft Word 2007 window, then try to press Ctrl+F on your keyboard in order to display the Search dialog box, type a keyword as you wish and then click on the Find Next button, and press the Esc button on your keyboard in order to close the Search dialog.
  19. Now press F3 button on your keyboard, and Microsoft Word 2007 will automatically find to the next occurancy in your file Word without having to display the Search dialog box.
  20. The same thing you can do with the FindPrevious by clicking on the Shift+F3 button on your keyboard.

Congratulations! Now your work will be easier than before. Life became more excited! :)

In Conclusion

Now you can already do a search of data in Microsoft Word 2007 files easily and quickly. Once you do a search, close the Search dialog box, then press the F3 key on the keyboard, then the Microsoft Word application will search the next without having to always display the Search dialog box (the same way as we used to do a search in the Notepad application using F3 key). On the other side, if you press Shift + F3 key on your keyboard, the Microsoft Word application will look into the previous location had been found. You’ll also get a message that you can customize the message by yourself that inform you about the last word found by Microsoft Word, if the search had found no result again.

Since I use is Microsoft Office 2007, then the following solution I implemented only in Microsoft Word 2007. I have never tried this in other versions of Microsoft Word. Should you try this, then let us know about the result by leaving your comment below this post.

Share

Comments

  1. gkiffney says:

    Thanks, the F3 remapping has bothered me for a while but this works great.

Speak Your Mind

*