Cocoa-compatible Text Search Shortcuts in Microsoft Word 2008
Mac OS X — 25 Jun 2009 14:01 — 399 days ago

For me, the Mac OS X keyboard shortcuts for the text editing commands “Use Selection for Find” and “Find Next” / “Find Previous” are a reflex by now. These shortcuts and the way the commands work are pretty consistent across all Mac OS X apps that allow text editing.

The exception, of course, is Microsoft Word.

It drove me nuts that it doesn’t work the same way there, and obviously Word is exactly where I edit a lot of text. To bring it in line with the other applications I created three AppleScripts that implement these commands and bound them to the standard shortcuts ⌘E, ⌘G and ⇧⌘G with FastScripts (which is out in a great new version 2.4 with more features available for free).

Use Selection for Find:

tell application "Microsoft Word"
    set mySelection to content of selection
    set myFind to find object of selection
    set content of myFind to mySelection
end tell

Find Next:

tell application "Microsoft Word"
    set myFind to find object of selection
    execute find myFind wrap find find continue with match forward
end tell

Find Previous:

tell application "Microsoft Word"
    set myFind to find object of selection
    execute find myFind wrap find find continue without match forward
end tell
Microsoft Word 2008 Text Search FastScript menu commands

Comments
Posted by Jonathan Lundell on 28 Jun 2009 01:18

Thank you; you're most kind. It's one of those constant annoyances. It feels so good when it stops.

Powered By blojsom