0

When I use Ctrl+F my selected text is put into the find side panel, but I need to do extra mouse steps to do a replace.

When I do Ctrl+H I get a replace dialog box, but it ignores my selected text.

Is there a way to have a keyboard shortcut that opens a replace box directly, putting selected text into the find field?

Kristian
3,13017 silver badges22 bronze badges
asked Jan 27, 2015 at 15:15

2 Answers 2

1

You can press Ctrl+C, Ctrl+H, Ctrl+V to get your desired effect, but if even that's too much then you can make a macro to do it all in one go.

Perhaps map it to the unused Ctrl+Alt+H key combination.

Sub QuickReplace()
 Selection.Copy
 Dim DataObj As MSForms.DataObject
 Set DataObj = New MSForms.DataObject
 DataObj.GetFromClipboard
 Selection.Find.Text = DataObj.GetText
 Dialogs(wdDialogEditReplace).Show
End Sub

If you receive a "User-defined type not defined" you are missing the reference to Microsoft Forms 2.0 Object Library. If its not listed, add C:\Windows\System32\FM20.dll or C:\Windows\FM20.dll as a reference.

Kristian
3,13017 silver badges22 bronze badges
answered Jan 27, 2015 at 17:34
0

Is there a way to have a keyboard shortcut that opens a replace box directly, putting selected text into the find field?

That's the default behaviour with Word 2013 when you hit Ctrl+H.

Perhaps this is of interest to you even though you explicitly mentioned Word 2010.

answered May 5, 2016 at 18:27
3
  • Is there a way to set this as the default behavior in Word 2010? Commented May 7, 2016 at 2:41
  • @MarkKosmowski: Not that I know of. Commented May 7, 2016 at 8:30
  • @MarkKosmowski Didn't the macro solution work for you? Another solution would be to install AutoHotkey and to write a script which would intercept Ctrl+H and do what you want. I could try writing a script if that was a viable solution and see whether it works at all. Commented May 7, 2016 at 8:33

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.