COM 加载项不会在 Word 2007 中消失
我有两个不同的 COM 加载项,一个用于 Word 2003,一个用于 Word 2007。Word
2003 每次都工作得很顺利,没有任何问题等等...但是现在,当我打开 Word 2007 时,Word 2003 中的按钮出现在我的 Word 2007 功能区。即使在我禁用加载项或清理项目后,这种情况仍然发生...我已尝试了所有方法,包括删除 Word 2003 加载项的所有 .dll,但问题仍然存在...
有关问题所在的任何建议是?
干杯
I have two different COM add-ins, one for Word 2003 and one for Word 2007.
Word 2003 works like a charm every time, no issues etc...but now, when I open Word 2007, the buttons from Word 2003 appear in my Word 2007 ribbon. This still happens even after I disabled my add-in or clean my project...I've tried everything, including deleting all .dlls for my Word 2003 add-in but the problem still persists...
Any suggestions on what the problem is?
cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您特意在普通.dot 之外的模板中配置这些按钮,那么它们将在您安装时自动“消失”。
通常认为对 Normal.dot 进行更改是不好的做法,但许多人没有意识到,除非您在创建自己的按钮和工具栏之前在 Word 中设置“CustomizationContext”属性,否则这正是您正在做的事情,修改normal.dot,并且在卸载插件后这些更改将持续存在。
If you make a point of configuring those buttons in a template OTHER than normal.dot, they will automatically "go away" when you install.
It's generally considered bad practice to make changes to Normal.dot, but many people don't realize that unless you set the "CustomizationContext" property in word before creating you're own buttons and toolbars, that's precisely what you're doing, modifying normal.dot, and those changes WILL persist after you've uninstalled your addin.
作为卸载过程的一部分,您必须“手动”删除该按钮。这是我使用的代码:
You must "manually" remove the button as part of your uninstall process. This is the code I use:
我怀疑问题在于normal.dot模板。
尝试在删除按钮、命令栏等后保存正常模板,使用:
I suspect that the problem relies in normal.dot template.
Try to save normal template after removing buttons, commandbars etc using: