如何在不使用功能区按钮的情况下制作任务台加载项,以自动在文档上打开
我正在创建一个内部加载项,当有人打开将与他们共享的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 usingOffice.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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
无法启用/显示应用程序的任务窗格,而不是文档(在您的情况下)。
您只能为特定文档启用
autoopen
功能。不要使用autoopen
功能来人为地增加您的加载项的用法。如果您的加载项可以使用某些文档自动打开是没有意义的,那么此功能可能会使用户烦恼。如果Microsoft检测到autoopen
功能的滥用,则可能会从appsource
中拒绝您的加载项。如果您需要启用特定文档的任务窗格/自动打开 - a-a-task-pane-with-a-document“ rel =“ nofollow noreferrer”>自动打开带有文档的任务窗格文章。注意,
autoopen
功能当前在以下平台中支持:办公室,如果您想为应用程序实施此类功能,我建议我建议在 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 theautoopen
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 theautoopen
feature, your add-in might be rejected fromAppSource
.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:If you want to get such feature implemented for the application I'd suggest filing a feature request at https://aka.ms/M365dev-suggestions .