Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Jun 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Change Find Dialog Defaults in Registry? (Word97)

    I'd like my Word97 Find and Replace dialog to always default to "Search: Up" and to "Find whole words only".

    A fellow suggested in microsoft.public.word.docmanagement that this should be easy to accomplish by placing the following macro in the normal.dot file, but then said that the macro doesn't work because the Find dialog is broken. I've verfied that he's correct, in Word97 at least.

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

    Are there any Registry settings I can change to get the defaults I'm looking for?

    Thanks in advance.

    Daik

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Change Find Dialog Defaults in Registry? (Word97)

    Welcome to Woody's Lounge!

    As far as I know, these settings aren't stored in the registry or anywhere else. If you quit and restart Word, it will use the default settings again.

    The WholeWord argument seems to work, but the Direction argument fails to do anything... It may be possible to set the Direction using SendKeys, but that is reputedly wacky.

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Change Find Dialog Defaults in Registry? (Word

    Does this work in Word 97??

    <code>Sub FindBackwards()
    'Preset the Find dialog
    With Selection.Find
    .ClearFormatting
    .Forward = False 'Nonstandard
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = True 'Nonstandard
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    End With
    'Display the Find dialog
    Dialogs(wdDialogEditFind).Show
    End Sub</code>

  4. #4
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Change Find Dialog Defaults in Registry? (Word

    <P ID="edit" class=small>(Edited by Klaus Linke on 26-Jun-05 23:22. )</P>It probably does <img src=/S/blush.gif border=0 alt=blush width=15 height=15> -- Although it has the same problem of making the dialog modal, and not being able to get to the "Replace" and "Goto" tabs of the dialog.
    [At least in Word2003...]

    If you use <pre>' Display the Find dialog
    CommandBars.FindControl(ID:=141).Execute
    </pre>

    instead of <pre>'Display the Find dialog
    Dialogs(wdDialogEditFind).Show
    </pre>

    in Jefferson's macro, this seems to remove the problem. But then you can't call the macro EditFind any more (intercepting "Edit > Find" and Ctrl+F automatically) since this would result in an endless loop.

    [CommandBars.FindControl(ID:=141) is the control "Edit > Find"]

    The AutoExec macro using SendKeys didn't work well?
    The Word97 dialog looked a bit different, so you'd need to use the sequence of Tab, spacebar, arrow keys and/or (ALT) accelerator keys that achieve the settings you want.

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> the fellow from the newsgroups

  5. #5
    New Lounger
    Join Date
    Jun 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Change Find Dialog Defaults in Registry? (Word

    Klaus,

    I modified your SendKeys macro as follows so that my Find dialog always Searches Up and Finds whole words only. It works reliably in Word97.

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

    Thanks very much to you, Hans and Jefferson for your comments and suggestions.

    Daik

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •