Paste Unformatted Text in Word

How to create this keyboard shortcut in five minutes!


Paste in Word

Copying and pasting text from a web page into an MS Word document can be frustrating. Most of the time, we just need the text without its formatting (e.g. font, size, color). The ‘Paste Special’ command in MS Word has an option to paste text without formatting, but it takes several steps. What if you could paste unformatted text just with a simple shortcut key? This 5-minute how-to will explain the process of creating a keyboard shortcut that will do exactly that.

What you need: ShortKeeper (info & free download),

Note: ShortKeeper is not an MS Word add-in; it is a Windows application for creating keyboard shortcuts. You can use it to speed up just about anything, including logging in to websites, opening folders, inserting text, and much more. Improved efficiency guaranteed!

How to in 5 minutes

ShortKeeper UI

  1. In the left column, select the command “Run AutoHotkey code”.
    Note: The order of commands in the list can change. The Up/Top/Dn/Bot buttons at the bottom of the list let you move up your most useful command(s).

  2. In the center column, click the button New.
    Note: If you don’t click New you will be editing the selected shortcut in the right column instead of creating a new one.

  3. In the DESC field (center column), type “Paste unformatted text”.

  4. In the PARAM field, paste the following code:
    if WinActive("ahk_class OpusApp")
      ControlGet, hwnd, hwnd, , _WwG1, A
      if DllCall("oleacc\AccessibleObjectFromWindow", "Ptr", hwnd, "UInt"
      , 0xFFFFFFF0, "Ptr", -VarSetCapacity(IID,16)+NumPut(0x46000000000000C0
      , NumPut(132096, IID, "Int64"), "Int64"), "Ptr*", pacc) = 0
        WordApp := ComObject(9, pacc, 1).Application
      MsgBox 0x40040, ShortKeeper, There is no Word document window active.

  5. In the HOTKEY section, click Ctrl and select P.

  6. Finally, click Save.

That's it! Pressing Ctrl+P will paste the unformatted text (if AutoHotkey is running).

Note: If AutoHotkey is not running, just start it with the Start/Stop AutoHotkey button. It is possible to set an option (in the “Option” tab) to start AutoHotkey automatically at Windows start-up. There is also an option to start AutoHotkey automatically when ShortKeeper starts. A small hand icon in the system tray, usually at the bottom right of the screen, will indicate that AutoHotkey is active.

More Info

The shortcut will paste the text if the Word document is the active window and is not busy (e.g. selecting a command).

ShortKeeper includes AutoHotkey (as its shortcut processor). When you are finished with this tutorial, you could close ShortKeeper, and AutoHotkey will continue processing your keyboard shortcut(s) in the background. ShortKeeper is only needed to add/modify/delete shortcuts, manually start/stop AutoHotkey, and set certain operating options.

Download ShortKeeperForum