Open h8nor opened 1 year ago
I am not quite sure what the suggested feature entails, but as I understand it, it affects the host app. Assuming that is the case, this would be out of scope. Rubberduck is intended basically exclusively for improving the VBE, i.e. the actual editing environment for VBA, independent of which host app is hosting the vba code.
The VBE doesn't know there's a difference between dotx
and dotm
, and the former could be saved as the latter, and other hosts support multiple VBA projects/host documents - Excel, for example: there is no way to know from the VBIDE model whether the host application will allow the VBA code to be saved along with the document.
The exception on close seems like some internal background process is trying to disable a CommandBar control - could be a bug in the teardown sequence where we're accidentally responding to an event and try to disable the "current selection" label (just a hypothesis) but the label/button has already been destroyed. Could be interesting to see if it still happens if all editor windows are closed before unloading, so no module code pane is active then.
As for the feature request, I think it could make sense to have a list of host apps in the configuration with their respective "enabled" state - Rubberduck could read that configuration before it even checks whether to display a splash screen, and skip initialization when the host is "disabled".
Rubberduck is intended basically exclusively for improving the VBE, i.e. the actual editing environment for VBA, independent of which host app is hosting the vba code.
If Normal.dotm
with macros is installed, then you open the VBA editor all control is blocked, the modules not visible. It is not possible to work with the code. Therefore would like to have a setting to disable app in Word.
I think you can check for yourself if you create a new group in ribbon and add any macro from Normal.dotm
.
The VBE doesn't know there's a difference between dotx and dotm, and the former could be saved as the latter, and other hosts support multiple VBA projects/host documents - Excel, for example: there is no way to know from the VBIDE model whether the host application will allow the VBA code to be saved along with the document.
Pity that it is impossible to get name of main app. I assumed that the error may be related to manual settings of ribbon menu. The buttons macros are gone (CommandBar control) since old template format was converted to new template. Need to recreate the buttons on UIRibbon to test my hypothesis. But this will take time.
As for the feature request, I think it could make sense to have a list of host apps in the configuration with their respective "enabled" state - Rubberduck could read that configuration before it even checks whether to display a splash screen, and skip initialization when the host is "disabled".
It would be great to have such an alternative.
The exception on shutdown is the same as in #6150. I think that has nothing to do with the ribbon.
RD3 will also systematically load the add-in in all VBE hosts, however it's no longer going to be the VBE that determines what project(s) you're working with, and you're not going to be editing a RD3 project in the VBE most of the time (beyond edit-and-continue while debugging, that is); as such, implementing disabled hosts in 2.x would probably make sense, but it's going to be moot in v3 since you'll always be deciding what project(s)/workspace(s) to load in the Rubberduck Editor.
Justification
Word 2019 has installed a DOT template with old macros. After converting to new format DOTX and adding buttons to the ribbon, modules with macros are no longer available in VBA.
Description
Can you add a checkbox setting to disable app on VBA for some applications?
Additional context
Error when trying to close Word (with app installed)
![error_rubberduck](https://github.com/rubberduck-vba/Rubberduck/assets/6163937/3934c75f-5139-4a53-b513-f0a019284a5a)
Export ribbon settings
``` xml