问题
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).
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).
So My question is how do you turn off an Office Word 2003 COMAddIn without completely removing it from Word itself?
Also note that I'm using c#
Thanks
回答1:
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.
来源:https://stackoverflow.com/questions/10817452/comaddins-how-to-turn-them-on-off-programmatically-in-office-word-2003