如何在不使用功能区按钮的情况下制作任务台加载项,以自动在文档上打开

发布于 2025-01-27 15:56:55 字数 503 浏览 3 评论 0原文

我正在创建一个内部加载项,当有人打开将与他们共享的PPTM时,需要自动打开Taskpane。加载项需要没有任何色带/菜单按钮,这就是为什么它需要自动打开的原因,但是我似乎不能同时做这两个事情。

我通过删除有效的清单文件的一部分,但可以阻止Taskpane自动打开,而没有任何功能区UI。

我通过使用会自动打开加载项 office.context.document.settings.set(“ office.autoshowtaskpanewithdocument”,true);   Office.context.document.settings.saveasync();

以及尝试Office.Addin.SetStartupBehavior(Office.startupbehavior.load)代码>函数似乎都起作用。

但是,当试图在同时使用两者时,它似乎不起作用。我是否缺少某些东西,或者不可能自动打开一个无UI-Taskpane加载项?

I'm creating an internal add-in that needs to automatically open the taskpane when someone opens up a PPTM that will be shared to them. The add-in needs to not have any sort of ribbon/menu buttons which is why it needs to automatically open, but I can't seem to do both of these things at the same time.

I've made the add-in not have any ribbon UI by removing the part of the manifest file which works, but stops the taskpane from automatically opening.

I've made the add-in automatically open by using
Office.context.document.settings.set("Office.AutoShowTaskpaneWithDocument", true);  Office.context.document.settings.saveAsync();

as well as trying Office.addin.setStartupBehavior(Office.StartupBehavior.load); in the Office.initialize function which both seem to work.

However, when trying to use both in conjunction it doesn't seem to work. Am I missing something or is it not possible to have a UI-less taskpane add-in automatically open?

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

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

发布评论

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

评论(1

对你再特殊 2025-02-03 15:56:55

无法启用/显示应用程序的任务窗格,而不是文档(在您的情况下)。

您只能为特定文档启用autoopen功能。不要使用autoopen功能来人为地增加您的加载项的用法。如果您的加载项可以使用某些文档自动打开是没有意义的,那么此功能可能会使用户烦恼。如果Microsoft检测到autoopen功能的滥用,则可能会从appsource中拒绝您的加载项。

如果您需要启用特定文档的任务窗格/自动打开 - a-a-task-pane-with-a-document“ rel =“ nofollow noreferrer”>自动打开带有文档的任务窗格文章。注意,autoopen功能当前在以下平台中支持:

  • Windows桌面上的Office。 在Mac上构建16.0.8121.1000+
  • 办公室。 构建15.34.17051500+
  • 在网上

办公室,如果您想为应用程序实施此类功能,我建议我建议在 https://aka.ms/m365dev-suggestions

There is no way to enable/show the task pane for the application, not document (presentation in your case).

You can enable the autoopen feature for a particular document only. Don't use the autoopen feature to artificially increase usage of your add-in. If it doesn't make sense for your add-in to open automatically with certain documents, this feature can annoy users. If Microsoft detects abuse of the autoopen feature, your add-in might be rejected from AppSource.

If you need to enable the task pane for a particular document you may find the required steps for that in the Automatically open a task pane with a document article. Note, the autoopen feature is currently supported in the following platforms:

  • Office on Windows Desktop. Build 16.0.8121.1000+
  • Office on Mac. Build 15.34.17051500+
  • Office on the web

If you want to get such feature implemented for the application I'd suggest filing a feature request at https://aka.ms/M365dev-suggestions .

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