Underlying problem I was trying to solve is to apply custom key bindings for internal VSTO Word addin methods (develiped in C#):
Globals.ThisAddIn.Application.KeyBindings.Add(
Word.WdKeyCategory.wdKeyCategoryCommand,
"MyMethodName",
myKey,
ref _missing,
ref _missing);
Well, the problem is that this code always throws an exception because (Microsoft MSDN): “there's no way (in the object model or Word application) to bind to anything but VBA macros”.
What other developers are trying to do is to implement a workaround with VBA method that assign key bindings to VBA callbacks when addin loads, and call C# addin from those callbacks in turn. (see how to call VBA from C# for details)
This idea has a chance for live: .NET AddIn and VBA-enabled Word template. But in my project I need to deliver this addin in a single Click Once package to end-user machines (inside a corporate network where security settings are not an issue).
So the Question is: how to make a mix of C# Add-In (Ribbon) and VBA scripts in one deployment package?
Does anyone has such experience to share?