Office add-in with both taskpane and content?

拟墨画扇 提交于 2019-12-19 05:00:24

问题


I spent all night looking this up and can't find it.

Is it possible to have an Excel/Office add-in that has both content and taskpane components?

Really, I want a content app, but I want extra options/buttons in the ribbon and taskpane that will trigger different actions/changes in my content app. Whenever I try to add the VersionOverrides xml node to my manifest on a content app, it always fails. None of my buttons show up. All the examples I can find that work have the namespace [...]/taskpaneappversionoverrides. I've tried changing it to [...]/contentappversionoverrides but that doesn't work either.

The reason I want this is because inserting a content app is obtuse because you have to go to Insert > My Addins > Select add in. It is hard to find. But it is really easy to trigger actions when they've installed a taskpane add in.

   <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
   <Hosts>
     <Host xsi:type="Workbook">
       <DesktopFormFactor>
         <GetStarted>
         ... custom tab, groups, buttons, etc

回答1:


It is not possible to launch a taskpane from a content add-in and commands are only supported for the taskpane manifest. An alternative for your scenario is to have a content add-in and then, to declutter some of the UI in your content add-in, use the dialog API (E.g. have a gear icon than then opens the dialog for more real state where you present more options).

Longer term I'm thinking we should have an API to allow you to insert web objects on the document. So the model would be to just have a single "add-in" concept, that has commands, and then from commands you use APIs to do stuff, including inserting web objects into the document, displaying dialogs, or panes.




回答2:


At this time you can only show a taskpane or a dialog through an add-in command. It is a scenario that we've heard and we have in our roadmap to address (not committed date yet). We can reply to this thread when the functionality is available for preview.

Is there a particular scenario you want where you'd need this to be a content add-in (i.e. a data visualization?).

thanks



来源:https://stackoverflow.com/questions/41127089/office-add-in-with-both-taskpane-and-content

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!