View Single Post
 
Old 07-14-2014, 10:47 PM
mark99k's Avatar
mark99k mark99k is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Oct 2012
Location: California USA
Posts: 20
mark99k is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
There's nothing apparent from what you've posted that you ever clear or disable the new keybindings. In any event, once they're set, they're available to all documents. If you wanted to limit their scope to documents based on a particular template, I believe you'd need to add/enable & clear/disable them via WindowActivate & WindowDeactivate events.
Hi Paul. I actually have tried both disabling and clearing but it made no difference, and I've since read in the documentation for the Keybinding.Disable method, "You don't need to remove or rebind a KeyBinding object before adding it elsewhere."

I'm certain it's possible to limit the scope of a shortcut to a single document with the CustomizationContext property; I do it often in other add-ins, and there are examples in the documentation for it (and I did it just now with a simple add-in to prove I'm not hallucinating...).

I'm tempted to pour all the code from the this add-in into an emptied-out version of one where it works.... I was just hoping for a revelation that would save me from that.
Reply With Quote