The main problem I was trying to solve was to apply special key bindings for the internal methods of adding VSTO Word (with the C # extension):
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 is no way (in the object model or Word application) to bind to everything except VBA macros."
Other developers are trying to implement a workaround using the VBA method, which assigns key bindings to VBA callbacks when loading addin and calls C # addin from these callbacks in turn. (see calling VBA with C # for details)
This idea has a chance for life: .NET AddIn and Word template with VBA support. But in my project, I need to deliver this add-on in one Click Once package to destination computers (inside the corporate network, where security settings are not a problem).
So the question is: how to make a combination of C # add-on (Ribbon) and VBA scripts in a single deployment package?
Does anyone have such an experience?
c # vba vsto clickonce
Ghen
source share