Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Add emacs key bindings to Microsoft Word (2008)' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Add emacs key bindings to Microsoft Word (2008)
Authored by: nomis on Jul 03, '08 12:44:03AM
Since Word 2008 doesn't support VB scripts, the Ctrl+K (delete to end of line) method above doesn't work anymore. Here's a workaround.

The solution is to use Word's "EndOFLineExtend" command, which extends the selection to the end of the line, then delete the selection. Normally, this command has the keyboard shortcut of Shift+End. I'm using that in the Applescript below.

So . . . create an Applescript with this code:

tell application "Microsoft Word"
   activate
   execute key binding (find key key code (build key code key1 shift_key key2 end_key))
   delete selection
end tell
...and save it as "Delete to end of line\ck" in your ~/Documents/Microsoft User Data/Word Script Menu Items/ folder. The "\ck" (note that it's a backslash) at the end tells Word to use Ctrl+K for this custom script.

Now you have Ctrl+K back in Word 2008. Enjoy.

[ Reply to This | # ]
Add emacs key bindings to Microsoft Word (2008)
Authored by: ylon on Aug 13, '08 07:44:17AM

But can we also figure out a way to get this into a different copy buffer versus deleting it? Such as scrapbook and then pulling it back out with ctrl-y?



[ Reply to This | # ]
Add emacs key bindings to Microsoft Word (2008)
Authored by: ylon on Aug 13, '08 07:46:58AM

Taking a quick look without implementing anything, it seems that one could put in a CopyToScrapbook somehow prior to the deletion in this script and then just use a PasteFromScrapbook for ctrl-y...



[ Reply to This | # ]