处理文件 -> Word 2007 中的新增功能
我正在为 Word 2007 编写 VSTO 插件。当用户选择“文件”->“新建”(或从快速访问工具栏中选择它)时,我需要显示自定义表单而不是标准的新文档对话框。我该怎么做?我没有看到我可以处理的应用程序事件,而且我似乎也找不到添加事件处理程序的按钮。
I am writing a VSTO addin for Word 2007. When the user selects File->New, (or selects it from the quick access toolbar) I need to display a custom form instead of the standard new document dialog. How do I do this? I don't see an application event I can handle and I can't seem to find the buttont to add an event handler too.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,刚刚找到了。您需要创建一个 Ribbon xml,然后为这些按钮添加命令。在这种情况下,功能区 xml 是
,后面的代码是
MSDN 上的此操作方法向您展示了如何操作 http://msdn.microsoft.com/en-us/office/dd361753.aspx
Ok, just found it. You need to create a Ribbon xml and then add commands for those buttons. In this case the ribbon xml is
and the code behind is
This how-to on MSDN shows you how to do it http://msdn.microsoft.com/en-us/office/dd361753.aspx