我的 Office 加载项配置页应该放在哪里?

发布于 2024-07-27 13:01:02 字数 277 浏览 4 评论 0 原文

我正在为 Word、Excel 和 PowerPoint 编写 COM 插件。 该加载项具有一些用户可配置的设置(实际上大约有一个页面......或者甚至可能不止一个页面)。 将这些呈现给用户的标准方式是什么? 通过工具->选项下的自定义页面? (如何?)在自定义工具栏上的自定义按钮下? 加载项的特定菜单?

如果是 Outlook,我会添加一个自定义属性页。 我非常有信心我可以轻松地在谷歌上搜索其他办公应用程序的类似内容,但我显然没有寻找正确的术语。 也非常欢迎改进我的搜索的提示!

I'm writing a COM add-in for Word, Excel and PowerPoint. This add-in has some user-configurable settings (about a page full of them actually... or perhaps even more than a single page). What is the standard way of presenting these to the user? Through a custom page under Tools->Options? (how?) Under a custom button on a custom toolbar? A specific menu for the add-in?

If it were Outlook, I would add a custom property page. I was pretty confident I could easily google something similar for the other office application, but I'm obviously not searching for the right terms. Hints to improve my searching are also very welcome!

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

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

发布评论

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

评论(3

时光倒影 2024-08-03 13:01:02

更新

我刚刚意识到,从您的问题可以看出,您现在的目标是 2003 年及之前的 Office 版本,例如工具菜单在 2007 年就消失了。

您可能仍然可以找到有关您的问题的答案通过查看上述从 2003 年到 2007 年迁移的起点来回答这个问题:对示例 2003 加载项的设置的访问位于工具菜单的加载项特定子菜单中,如下所示如图 7 所示。


对于当前和未来版本的 Office(即 2007 及更高版本),有关用户界面问题的第一站应该是 Office Fluent 用户界面开发人员门户,具体来说,您会在那里找到 '2007 Office 系统文档:解决方案和加载项的 UI 样式指南'

可能值得指出的是,本指南与 Windows 用户体验交互不相提并论指南(UX 指南) 大幅领先,考虑到 Office 团队和其他 Microsoft 部门之间在为第 3 方开发人员制定下一个事实上的 UI 标准时几乎传统的友好竞争,这是不幸的。

人们仍然可以从那里找出初步方向,例如 Gary 显然与您提供用户设置的需要不一致,引用:

创建自定义任务窗格,如果...
您的解决方案需要呈现数据
关于所需的文件
以非模态方式可见,
使用自定义任务窗格。 [...]

您可以在简单迁移部分中找到关于您的问题的一个很好的起点,其中从 UI 逐步探索了将简单的 2003 加载项迁移到当前 2007 版本的过程设计视角; 毫不奇怪,该加载项也具有设置功能,因此您的要求得到了满足,尽管只是在侧面。

在这里复制此部分会有点冗长,而且我不确定复制此处使用的内联图像是否合法,只需特别查找图 9 即可开始。

您可以根据您的具体情况进一步了解,祝您好运!

Update:

I just realized one can figure from your question you are targeting Office versions up to and including 2003 right now, as for example the tools menu is gone in 2007.

You might still find an answer regarding your question by looking at the starting point for the mentioned migration from 2003 to 2007: access to the settings for the sample 2003 add-in is located in an add-in specific sub menu of the tools menu, as shown in Figure 7.


For current and future versions of Office (i.e. 2007 and up) your first stop regarding user interface questions should be the Office Fluent User Interface Developer Portal, specifically you'll find there the '2007 Office System Document: UI Style Guide for Solutions and Add Ins'.

Its probably worth pointing out that this guide is not on par with the Windows User Experience Interaction Guidelines (UX Guide) by a huge margin, which is unfortunate given the almost traditional friendly competition between the Office team and other Microsoft departments in setting the next de facto UI standard for 3rd party developers.

Still one can figure out initial directions from there, for example the recommendation regarding scenarios for custom task panes as suggested by Gary clearly is at odds with your need to offer user settings, citation:

Create a custom task pane if…
Your solution needs to present data
about a document that is required to
be visible, in a non-modal fashion,
use a custom task pane. [...]

You can find a good starting point regarding your question in section Simple Migration, where the migration of a simple 2003 add-in to the current 2007 release is explored step by step from a UI design perspective; not surprisingly this add-in features settings too, hence your requirements are addressed, albeit only on the side.

Reproducing this section here would be a bit lengthy plus I'm not sure whether it would be legal to reproduce the inline images used there, just look for Figure 9 in particular to get you started.

You can take it further from there depending on your particular scenario, good luck!

新雨望断虹 2024-08-03 13:01:02

我很确定您无法向 Word、Excel 和 PowerPoint 的工具添加选项卡 | 选项对话框。 我知道至少在 2007 年之前你不能在 Word 中做到这一点。

我建议在某个地方为您的加载项添加一个菜单项,可能在“工具”菜单下。 我假设您的加载项还没有任何其他菜单项? 我会将其放在菜单项而不是工具栏按钮中,因为大多数用户不需要一直更改“设置”,因此他们确实需要一直查看工具栏上的按钮。 我的屏幕截图显示了 Word 中的菜单,选项位于底部,但不是实际的选项对话框: http://www.amos Fivesix.com/timken-business-stationery

如果您担心人们会发现您的菜单项隐藏在“工具”菜单中,则可以在第一次使用该应用程序时弹出一个窗口在安装您的加载项后启动。 让它显示菜单项所在位置的图片,或者只是解释如何到达那里。 许多应用程序在第一次运行时都会出现类似的情况。 我的一个较大的 Outlook 加载项在菜单栏上确实有自己的菜单(因此很容易找到),但我还有一个首次运行窗口来解释它的内容/位置。 您可以在此处查看示例:http://www.amos Fivesix.com/timken -电子名片

Gary McGill 关于任务窗格的想法也可能不错。 我对任务窗格没有任何经验。 我不确定它是否适合“应用程序设置”,因为任务窗格更像是您在处理文档内容的同时使用的无模式对话框。 更改加载项的设置可能不会这样。

I'm pretty sure you cannot add a tab to Word, Excel and PowerPoint's Tools | Options dialog. I know you cannot do that in Word before 2007 at least.

I would recommend adding a menu item for your add-in somewhere, probably under the Tools menu. I assume your add-in does not already have any other menu items? I would put it in a menu item rather than a toolbar button, since most users don't need to change "settings" all the time, so they do need to look at the button on the toolbar all the time. My screen shots here show the menu in Word with Options at the bottom, though not the actual options dialog: http://www.amosfivesix.com/timken-business-stationery

If you're worried about people finding your menu item tucked away on the Tools menu, you can have a window pop-up the first time the app is started after your add-in is installed. Have it show a picture of where the menu item is, or just explain how to get there. Lots of apps have things like that the first time they run. One of my larger Outlook add-ins does have it's own menu on the menu bar (so it's fairly easy to find) but I also have a first run window that explains what/where it is. You can see an example of that here: http://www.amosfivesix.com/timken-electronic-business-card

Gary McGill's idea for a task pane might be good as well. I don't have any experience with task panes. I'm not sure it would be appropriate for "application settings" since taks panes are more like modeless dialogs that you work with while also working with the document content. Changing your add-in's settings probably doesn't work that way.

画▽骨i 2024-08-03 13:01:02

不知道有没有标准的方法。 我只创建了 VBA 加载项,并且我不认为可以在“工具”|“工具”下添加自定义页面。 选项。

在我创建的 Excel 加载项中,我在加载项工具栏上放置了一个“设置...”按钮(该加载项在 _AddInInstall 事件期间创建了一个自定义工具栏)。

但这种方法当然意味着您的加载项必须具有自定义工具栏(或菜单)。

我快速检查了我有权访问的 Office 安装,该安装有一些加载项:

  • Adob​​e PDFmaker 加载项有自己的顶级菜单和工具栏。 该菜单有一个“更改转换设置”菜单
  • 项自定义加载项(眼睛共享,不知道它是什么)也有自己的顶级菜单。 该菜单有一个“设置...”菜单项。
  • Hummingbird(某种文档管理系统)到处都有菜单项,但没有设置对话框。 安装程序可能会在注册表中设置必要的配置值。

所以我的结论是:

  • 你不能在“工具”|“工具”下添加自定义页面。 选项(我想如果可能的话 Adob​​e 会这样做)。
  • 如果您的加载项有自定义菜单或工具栏,请添加“设置...”按钮或菜单项(不知道是否有标准图标)
  • 如果您的加载项没有自定义菜单或工具栏,我可能会在“工具”下添加一个菜单项。
  • 如果您不想让 Excel 界面变得混乱,您可以在“开始”菜单上安装一个外部程序(用 .NET 或其他程序创建)来更新注册表。 这当然要求所有相关设置都可以表示为注册表值,并且要保留。 这还意味着加载项在执行操作时应始终在注册表中查找设置值 - 而不是在启动时读取设置并将其缓存在变量中。

I don't know if there is a standard way. I have only created VBA add-ins, and I do not believe it is possible to add custom pages under Tools | Options.

In an Excel Add-In I created, I put a 'Settings...' button on the Add-Ins toolbar (the Add-In created a custom toolbar during the _AddInInstall event).

But this approach of course means your add-in must have a custom toolbar (or menu).

I did a quick check on an Office installation I have access to, that has a few Add-Ins:

  • The Adobe PDFmaker add-in has its own top-level menu, as well as a toolbar. The menu has a 'Change conversion settings' menu item
  • A custom add-in (eye-share, don't know what it is) also has its own top-level menu. The menu has a 'Settings...' menu item.
  • Hummingbird (some sort of document management system) has menu items all over the place, but no settings dialog. The installation program probably sets the necessary config values in the registry.

So my conclusion is:

  • You cannot add a custom page under Tools | Options (I guess Adobe would have done this if possible).
  • If your add-in has a custom menu or toolbar, add a 'Settings...' button or menu item (don't know if there is a standard icon for this)
  • If your add-in does not have a custom menu or toolbar, I would probably add a single menu item under Tools.
  • If you don't want to clutter the Excel interface, you could have an external program (created in .NET or whatever) installed on the Start Menu that updates the registry. This of course requires that all relevant settings can be represented as registry values, and are to be persisted. It also means that the Add-in should always look to the registry for settings values when performing operations - not read the setting at startup and cache it in a variable.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文