Change Find and Replace Defaults

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Are there Registry settings I can change so that the Find and Replace dialog
box always defaults to Search: Down and to Find whole words only?

Thanks in advance.

Daik
 
Daik said:
Are there Registry settings I can change so that the Find and Replace dialog
box always defaults to Search: Down and to Find whole words only?

Thanks in advance.

Daik

I meant to say, "always defaults to Search: Up"
 
Hi Daik,

It should be as easy as putting the macro below in your Normal.dot:

Sub EditFind()
With Dialogs(wdDialogEditFind)
.Direction = "1"
.WholeWord = "1"
.Show
End With
End Sub

Unfortunately, that dialog is broken: The search direction isn't changed at all, the dialog doesn't allow you to switch to the "Replace" and "GoTo" tabs any more, and it becomes modal (so you can no longer switch back and forth between the dialog and the text, say to copy/paste stuff).

Maybe you could do a dummy search in an AutoExec macro, and use SendKeys to set the search direction and "Whole words".
It seems to work, though it's pretty clumsy (and the SendKeys string I used is pretty long, so as to be usable in all language versions of Word):

Sub AutoExec()
Documents.Add
SendKeys "a{TAB}{TAB}{ENTER}{TAB}{TAB}{TAB}{UP}{UP}{TAB}{TAB} {ENTER}{ESC}"
On Error Resume Next
Dialogs(wdDialogEditFind).Display TimeOut:=0
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top