Ms office 两个并排打开的任务窗格

Ms office 两个并排打开的任务窗格,ms-office,office-js,office-addins,office-app,Ms Office,Office Js,Office Addins,Office App,我正在制作一个Office插件,它有两个功能区按钮。每个按钮都链接到不同的任务窗格,单击每个按钮会打开不同的任务窗格: <bt:Urls> <bt:Url id="Contoso.Taskpane1.Url" DefaultValue="https://localhost:3000/addin/page1" /> <bt:Url id="Contoso.Taskpane2.Url" DefaultValue="https://localhost:30

我正在制作一个Office插件,它有两个功能区按钮。每个按钮都链接到不同的任务窗格,单击每个按钮会打开不同的任务窗格:

<bt:Urls>
    <bt:Url id="Contoso.Taskpane1.Url" DefaultValue="https://localhost:3000/addin/page1" />
    <bt:Url id="Contoso.Taskpane2.Url" DefaultValue="https://localhost:3000/addin/page2" />
</bt:Urls>

似乎我见过一些Office加载项,其中两个任务窗格可以同时并排显示(我忘记了加载项到底是什么)。我时常需要这个,有人知道如何实现吗?

就是这样一个插件。您所需要做的就是创建两个不同的按钮,它们具有具有不同ID的
ShowTaskpane
操作

脚本实验室的产品清单中的示例:


.

就是这样一个插件。您所需要做的就是创建两个不同的按钮,它们具有具有不同ID的
ShowTaskpane
操作

脚本实验室的产品清单中的示例:



.

对不起,Michael,它在Excel Online中工作吗?我无法在Excel Online中将Script Lab的两个任务窗格并排放置…您无法将它们并排放置,但您会看到它们是垂直选项卡。所以实际上你可以有两个打开的,一次只能看到一个。如果你想要更多的UI灵活性,我建议你在抱歉的Michael上提交一个问题,它在Excel Online中工作吗?我无法在Excel Online中将Script Lab的两个任务窗格并排放置…您无法将它们并排放置,但您会看到它们是垂直选项卡。所以实际上你可以有两个打开的,一次只能看到一个。如果你想要更多的UI灵活性,我建议你在
            <Control xsi:type="Button" id="PG.CodeCommand">
              <Label resid="PG.CodeCommand.Label" />
              <Supertip>
                <Title resid="PG.CodeCommand.TipTitle" />
                <Description resid="PG.CodeSupertip.Desc" />
              </Supertip>
              <Icon>
                <bt:Image size="16" resid="PG.Icon.Code.16" />
                <bt:Image size="32" resid="PG.Icon.Code.32" />
                <bt:Image size="80" resid="PG.Icon.Code.80" />
              </Icon>
              <Action xsi:type="ShowTaskpane">
                <TaskpaneId>Office.AutoShowTaskpaneWithDocument</TaskpaneId>  
                        <===== A taskpane ID. This one is a "special" one that allows the taskpane
                               to auto-open if a document is marked as belonging to the add-in.

                <SourceLocation resid="PG.Code.Url" />
                <Title resid="PG.CodeCommand.Title" />
              </Action>
            </Control>
            <Control xsi:type="Button" id="PG.RunCommand">
              <Label resid="PG.RunCommand.Label" />
              <Supertip>
                <Title resid="PG.RunCommand.TipTitle" />
                <Description resid="PG.RunSupertip.Desc" />
              </Supertip>
              <Icon>
                <bt:Image size="16" resid="PG.Icon.Run.16" />
                <bt:Image size="32" resid="PG.Icon.Run.32" />
                <bt:Image size="80" resid="PG.Icon.Run.80" />
              </Icon>
              <Action xsi:type="ShowTaskpane">
                        <===== Whereas this one dosn't specify a taskpane ID,
                               and so it is different by default (but probably
                               should be explicit, come to think of it...)

                <SourceLocation resid="PG.Run.Url" /> 
                <Title resid="PG.RunCommand.Title" />
              </Action>
            </Control>