Excel VSTO:切换工作簿时保持显示自定义功能区

发布于 2024-10-07 08:41:14 字数 174 浏览 0 评论 0原文

我有一个 Vsto Excel 工作簿(在 Visual Studio 中创建),其中还包含自定义功能区。如果我在 Excel (2007) 中加载此工作簿,则仅当我的工作簿具有焦点时才会显示功能区。如果我切换到不同的工作簿,它就会消失。我知道这是设计使然,但是有什么方法可以更改此行为,以便我可以在选择任何工作簿时使用功能区的按钮?

I have a Vsto Excel workbook (created in Visual Studio) which also contains a custom ribbon. If I load this workbook in Excel (2007), the ribbon is only displayed as long as my workbook has focus. It disappears if I switch to a different workbook. I understand this is by design, but is there any way of changing this behavior so that I can use the ribbon's buttons when any workbook is selected?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清风无影 2024-10-14 08:41:14

为了拥有Excel范围的功能区,您需要在VS中创建一个“Excel 2007 Add-in”而不是“Excel 2007 Template”或“Excel 2007 Workbook”。

In order to have an Excel-wide ribbon, you need to create an "Excel 2007 Add-in" in VS instead of an "Excel 2007 Template" or "Excel 2007 Workbook".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文