Hi - my first time posting on this forum. I am using Word 2010.
I am trying to write a macro which, at its completion, activates another document and then comes up with the EditFind dialog box (i.e., that would perform the exact same thing as if you were to type "Alt-E, F" in Word. The following is what I came up with:
Windows("AnotherDocument.docx").Activate
With Dialogs(wdDialogEditFind)
.WholeWord = True
.Display
End With
Apparently I don't know how to work properly with dialog boxes because this does not work ideally. The dialog box that comes up does the following:
- Displays the message "Word found no items matching these criteria" even though no text to search has been entered.
- Requires the user to carry forward the search clicking on "Find Next" or pressing "Alt-F", but doesn't allow the user to simply press "Enter."
- After searching, comes up with a VBA error message if text is searched for and not found.
I'd appreciate your help. Thanks!