Monday, June 9, 2014

Microsoft Word : Assigning a KEYBOARD shortcut for deleting one line of text

Macro-based shortcut

  1. Create a new Macro with the following code (Alt+F8, specify the name, click Create):
    Selection.HomeKey Unit:=wdLine 
    Selection.EndKey Unit:=wdLine, Extend:=wdExtend 
    Selection.Delete Unit:=wdCharacter, Count:=1
    
  2. Assign a keyboard shortcut to it:
    • File > Option > Customize Ribbon
    • Click on Keyboard shortcuts: Customize (bottom left)
    • Scroll down the Categories list and select Macros, choose your new macro
    • Press the shortcut key combination (e.g. Ctrl+D)
    • Click Assign
    • Close > OK

No comments:

Post a Comment