rubberduck-vba / Rubberduck

Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
https://rubberduckvba.com
GNU General Public License v3.0
1.92k stars 301 forks source link

Idea: add a feature to disable app on VBA for some applications? #6146

Open h8nor opened 1 year ago

h8nor commented 1 year ago

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)
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Runtime.InteropServices.InvalidComObjectException: COM object that has been separated from its underlying RCW cannot be used.
   at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)
   at Microsoft.Office.Core.CommandBarControl.set_Enabled(Boolean pvarfEnabled)
   at Rubberduck.VBEditor.SafeComWrappers.Office12.CommandBarButton.set_IsEnabled(Boolean value)
   at Rubberduck.UI.Command.MenuItems.ParentMenus.ParentMenuItemBase.<>c__DisplayClass32_1.b__0()
   at Rubberduck.Parsing.UIContext.UiDispatcher.<>c__DisplayClass2_0.b__0(Object x)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4614.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Rubberduck
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.dll
----------------------------------------
Microsoft.VisualStudio.Interop
    Assembly Version: 17.0.0.0
    Win32 Version: 17.0.31723.112
    CodeBase: file:///C:/ProgramData/Rubberduck/Microsoft.VisualStudio.Interop.DLL
----------------------------------------
NLog
    Assembly Version: 4.0.0.0
    Win32 Version: 4.5.10.8381
    CodeBase: file:///C:/ProgramData/Rubberduck/NLog.DLL
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4605.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4605.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4584.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.ServiceModel
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4536.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel/v4.0_4.0.0.0__b77a5c561934e089/System.ServiceModel.dll
----------------------------------------
System.Runtime.Serialization
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4536.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
Rubberduck.VBEditor
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.VBEditor.DLL
----------------------------------------
Rubberduck.Core
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.Core.DLL
----------------------------------------
System.IO.Abstractions
    Assembly Version: 12.0.0.0
    Win32 Version: 12.2.1.44447
    CodeBase: file:///C:/ProgramData/Rubberduck/System.IO.Abstractions.DLL
----------------------------------------
Rubberduck.VBEditor.VB6
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.VBEditor.VB6.DLL
----------------------------------------
Rubberduck.VBEditor.VBA
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.VBEditor.VBA.DLL
----------------------------------------
Rubberduck.InternalApi
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.InternalApi.DLL
----------------------------------------
System.ValueTuple
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ValueTuple/v4.0_4.0.0.0__cc7b13ffcd2ddd51/System.ValueTuple.dll
----------------------------------------
EasyHook
    Assembly Version: 2.7.6684.0
    Win32 Version: 2.7.6684.0
    CodeBase: file:///C:/ProgramData/Rubberduck/EasyHook.DLL
----------------------------------------
Rubberduck.SettingsProvider
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.SettingsProvider.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4550.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4390.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
WindowsBase
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4605.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
Rubberduck.Resources
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.Resources.DLL
----------------------------------------
PresentationFramework
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4605.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll
----------------------------------------
PresentationCore
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4605.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Rubberduck.Resources.resources
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/cs/Rubberduck.Resources.resources.DLL
----------------------------------------
Rubberduck.Resources.resources
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/de/Rubberduck.Resources.resources.DLL
----------------------------------------
Rubberduck.Resources.resources
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/es/Rubberduck.Resources.resources.DLL
----------------------------------------
Rubberduck.Resources.resources
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/fr/Rubberduck.Resources.resources.DLL
----------------------------------------
Rubberduck.Resources.resources
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/it/Rubberduck.Resources.resources.DLL
----------------------------------------
System.Xml.Linq
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
Castle.Windsor
    Assembly Version: 4.0.0.0
    Win32 Version: 4.1.0
    CodeBase: file:///C:/ProgramData/Rubberduck/Castle.Windsor.DLL
----------------------------------------
Castle.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.2.1
    CodeBase: file:///C:/ProgramData/Rubberduck/Castle.Core.DLL
----------------------------------------
Rubberduck.Parsing
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.Parsing.DLL
----------------------------------------
Rubberduck.UnitTesting
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.UnitTesting.DLL
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.4614.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
office
    Assembly Version: 15.0.0.0
    Win32 Version: 15.0.4613.1000
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/office/15.0.0.0__71e9bce111e9429c/office.dll
----------------------------------------
Rubberduck.Interaction
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.Interaction.DLL
----------------------------------------
Rubberduck.SmartIndenter
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.SmartIndenter.DLL
----------------------------------------
Antlr4.Runtime
    Assembly Version: 4.6.0.0
    Win32 Version: 4.6.4.0
    CodeBase: file:///C:/ProgramData/Rubberduck/Antlr4.Runtime.DLL
----------------------------------------
Rubberduck.CodeAnalysis
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.CodeAnalysis.DLL
----------------------------------------
Rubberduck.Refactorings
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.Refactorings.dll
----------------------------------------
Rubberduck.RegexAssistant
    Assembly Version: 2.5.9.6291
    Win32 Version: 2.5.9.6291
    CodeBase: file:///C:/ProgramData/Rubberduck/Rubberduck.RegexAssistant.dll
----------------------------------------
System.Xaml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4605.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll
----------------------------------------
System.Windows.Interactivity
    Assembly Version: 4.0.0.0
    Win32 Version: 2.0.20525.0
    CodeBase: file:///C:/ProgramData/Rubberduck/System.Windows.Interactivity.DLL
----------------------------------------
ICSharpCode.AvalonEdit
    Assembly Version: 5.0.3.0
    Win32 Version: 5.0.3.0
    CodeBase: file:///C:/ProgramData/Rubberduck/ICSharpCode.AvalonEdit.DLL
----------------------------------------
System.Net.Http
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll
----------------------------------------
System.Collections.Immutable
    Assembly Version: 1.2.3.0
    Win32 Version: 4.6.26515.06
    CodeBase: file:///C:/ProgramData/Rubberduck/System.Collections.Immutable.DLL
----------------------------------------
netstandard
    Assembly Version: 2.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/netstandard/v4.0_2.0.0.0__cc7b13ffcd2ddd51/netstandard.dll
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
DynamicProxyGenAssembly2
    Assembly Version: 0.0.0.0
    Win32 Version: 4.2.1
    CodeBase: file:///C:/ProgramData/Rubberduck/Castle.Core.dll
----------------------------------------
DynamicProxyGenAssembly2
    Assembly Version: 0.0.0.0
    Win32 Version: 4.2.1
    CodeBase: file:///C:/ProgramData/Rubberduck/Castle.Core.dll
----------------------------------------
Microsoft.Office.Interop.Word
    Assembly Version: 15.0.0.0
    Win32 Version: 15.0.4603.1000
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Office.Interop.Word/15.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Word.dll
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
WindowsFormsIntegration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4605.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsFormsIntegration/v4.0_4.0.0.0__31bf3856ad364e35/WindowsFormsIntegration.dll
----------------------------------------
Infralution.Localization.Wpf
    Assembly Version: 3.3.0.0
    Win32 Version: 3.3.0.0
    CodeBase: file:///C:/ProgramData/Rubberduck/Infralution.Localization.Wpf.dll
----------------------------------------
System.Windows.Controls.Ribbon
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4605.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Controls.Ribbon/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Controls.Ribbon.dll
----------------------------------------
System.Web
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4494.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
PresentationFramework.Aero
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Aero/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Aero.dll
----------------------------------------
PresentationFramework.Aero2
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Aero2/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Aero2.dll
----------------------------------------
PresentationFramework-SystemData
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4605.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemData/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemData.dll
----------------------------------------
Microsoft.CSharp
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll
----------------------------------------
System.Dynamic
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll
----------------------------------------
PresentationFramework-SystemXmlLinq
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemXmlLinq/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemXmlLinq.dll
----------------------------------------
PresentationFramework-SystemXml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemXml/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemXml.dll
----------------------------------------
PresentationFramework-SystemCore
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemCore/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemCore.dll
----------------------------------------
GongSolutions.WPF.DragDrop
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.0.0
    CodeBase: file:///C:/ProgramData/Rubberduck/GongSolutions.WPF.DragDrop.DLL
----------------------------------------
SMDiagnostics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4536.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/SMDiagnostics/v4.0_4.0.0.0__b77a5c561934e089/SMDiagnostics.dll
----------------------------------------
System.ServiceModel.Internals
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4536.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel.Internals/v4.0_4.0.0.0__31bf3856ad364e35/System.ServiceModel.Internals.dll
----------------------------------------
UIAutomationProvider
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4605.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/UIAutomationProvider/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationProvider.dll
----------------------------------------
CustomMarshalers
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/CustomMarshalers/v4.0_4.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
----------------------------------------
stdole
    Assembly Version: 7.0.3300.0
    Win32 Version: 7.00.9466
    CodeBase: file:///C:/WINDOWS/assembly/GAC/stdole/7.0.3300.0__b03f5f7f11d50a3a/stdole.dll
----------------------------------------
System.Dynamic.DynamicAssembly
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll
----------------------------------------
Newtonsoft.Json
    Assembly Version: 13.0.0.0
    Win32 Version: 13.0.1.25517
    CodeBase: file:///C:/ProgramData/Rubberduck/Newtonsoft.Json.DLL
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
mscorlib.resources
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_ru_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:


    


When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Export ribbon settings
``` xml ```
Vogel612 commented 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.

retailcoder commented 1 year ago

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".

h8nor commented 1 year ago

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.

Examples of errors when clicking on the buttons in ribbon menu
![err1](https://github.com/rubberduck-vba/Rubberduck/assets/6163937/1953146e-8048-4163-a38f-7606dd315af0) ![err2](https://github.com/rubberduck-vba/Rubberduck/assets/6163937/4b83fa24-ddd8-4b7e-bf97-c958d6d02bf8)

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.

MDoerner commented 1 year ago

The exception on shutdown is the same as in #6150. I think that has nothing to do with the ribbon.

retailcoder commented 10 months ago

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.