View Single Post
 
Old 03-25-2013, 08:02 AM
kjworduser kjworduser is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Mar 2013
Posts: 5
kjworduser is on a distinguished road
Default Using EditFind in VBA on Word 2010

I believe this is a question for Microsoft programmers. I am trying to incorporate an EditFind command within a VBA procedure in Word 2010. It should exactly equal what would happen if you chose View, Macros, View Macros, Word Commands (under "Macros in"), EditFind, Run. (This could also be performed in Word 2010 by using "Advanced Find" on the dropdown choice for the Navigation bar, or by typing Alt-E, F.)

In 2007 or earlier, I could do this with either of the following

With Selection.Find
.MatchWholeWord = True
End With
On Error Resume Next
Application.Run MacroName:="EditFind"

_________________
- OR -
_________________

On Error Resume Next

With Dialogs(wdDialogEditFind)
.Find = ""
.WholeWord = True
.Display
End With



However, when I try using this code in Word 2010, the following results:
  • The Find dialog box comes up with a message "Word found no items matching these criteria" (even though I have not entered any criteria).
  • If I put in my own criteria and press "Enter," nothing happens. I have to click on "Find Next." It would be much preferable to be able to press "Enter," which is how the normal EditFind used to work.
Is there any way in Word 2010 to accomplish the EditFind function as it used to work in Word 2007 and earlier?

Thank you.
Reply With Quote