问题描述
我需要能够在Office Word 2003中关闭COM加载项,但仍将其保留在COMAddIn列表中(只是未启用).
I need to be able to turn off a COM add-in in Office Word 2003 but still keep it in the COMAddIn list (just not enabled).
我已经找到COMAddIn.Connect标志,并且将其设置为false以尝试关闭它,但是它似乎已将其从Office Word中完全删除,因此我必须重新安装该程序才能将其重新找回(似乎关闭注册表项).
I have found the COMAddIn.Connect flag and I set it to false to try and turn if off but it seems to completely remove it from Office Word and I have to re-install the program to get it back again (seems to turn off the registry keys).
所以我的问题是,如何关闭Office Word 2003 COMAddIn而不将其完全从Word本身中删除?
So My question is how do you turn off an Office Word 2003 COMAddIn without completely removing it from Word itself?
还请注意,我正在使用c#
Also note that I'm using c#
谢谢
推荐答案
我想出了这一点,您想遍历CommandBar属性中的列表,并将visible设置为false,以将其翻转.离开.您将visible设置为true即可将其打开.
I figured it out, You want to loop through the list in your CommandBar property and set the visible to false for which ever add-ins you want to be turned off. you set the visible to true to turn them on.
这篇关于COMAddIns如何在Office Word 2003中以编程方式打开/关闭它们的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!