views:

47

answers:

1

I'm working on an add-in for MS Word and I'd like to create a custom handler for pasting (EditPaste is the built-in command). I can see that, by default, Ctrl+V and Shift+Insert are bound to EditPaste, and there are buttons which also initiate a paste.

Unfortunately, some keyboards have additional buttons/combinations which result in a paste action. Is there a way to detect these, possibly using VBA?

+2  A: 

Not detectable, as far as I know, but here's a list:

  1. Paste - from a Cut/Copy.
    • Paste text or an object: CTRL + V
    • Paste special: CTRL + ALT + V
    • Paste formatting only: CTRL + SHIFT + V
    • Paste text or an object: SHIFT + INSERT
  2. Paste - from a Cut/Copy. (Note that A) these are for Word 2007/2010 only and B) they are keyboard sequences, not combinations.)
    • Keep Source Formatting: Alt and then H, V, K
    • Merge Formatting: Alt and then H, V, M
    • Keep Text Only: Alt and then H, V, T
  3. Paste - from a Spike (Spike is like a secondary clipboard, it doesn't use Windows Clipboard. Cut to the Spike is CTRL + F3)
    • Paste from the Spike once: CTRL + SHIFT + F3
    • Paste from the Spike multiple times: type the word spike and press F3
  4. Paste - just once. (Select and cut using F2 and then reposition the cursor anywhere)
    • Paste: ENTER
Otaku
What is Spike? Is it a third-party tool, part of Windows, or included with Office?
0xA3
@0xA3: It's part of Word. It's kind of a secondary clipboard. What it actually is is an AutoText entry that has a limited shelf life (it gets deleted as soon as you press F3). It's not really documented or taught anymore, especially now that AutoText is on it's way out due to Building Blocks and the like.
Otaku
Cool, thanks for your explanation :-)
0xA3