当您通过集中部署发布加载项时,您是否可以在默认情况下使其可见,而无需通过插入>手动添加它。我的插件?

时间:2017-06-21 22:04:33

标签: office-js

这是清单中控制taskpaneButton等的部分。我很确定你可以调整它来实现它但需要一些建议。

        <!-- Form factor. Currently only DesktopFormFactor is supported. -->
    <DesktopFormFactor>
      <!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."-->
      <GetStarted>
        <!-- Title of the Getting Started callout. resid points to a ShortString resource -->
        <Title resid="Contoso.GetStarted.Title"/>

        <!-- Description of the Getting Started callout. resid points to a LongString resource -->
        <Description resid="Contoso.GetStarted.Description"/>

        <!-- Point to a url resource which details how the add-in should be used. -->
        <LearnMoreUrl resid="Contoso.GetStarted.LearnMoreUrl"/>
      </GetStarted>
      <!-- PrimaryCommandSurface is the main Office Ribbon. -->
      <ExtensionPoint xsi:type="PrimaryCommandSurface">
        <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
        <OfficeTab id="TabHome">
          <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
          <Group id="Contoso.Group1">
            <!-- Label for your group. resid must point to a ShortString resource. -->
            <Label resid="Contoso.Group1Label" />
            <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
            <!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
            <Icon>
              <bt:Image size="16" resid="Contoso.tpicon_16x16" />
              <bt:Image size="32" resid="Contoso.tpicon_32x32" />
              <bt:Image size="80" resid="Contoso.tpicon_80x80" />
            </Icon>

            <!-- Control. It can be of type "Button" or "Menu". -->
            <Control xsi:type="Button" id="Contoso.TaskpaneButton">
              <Label resid="Contoso.TaskpaneButton.Label" />
              <Supertip>
                <!-- ToolTip title. resid must point to a ShortString resource. -->
                <Title resid="Contoso.TaskpaneButton.Label" />
                <!-- ToolTip description. resid must point to a LongString resource. -->
                <Description resid="Contoso.TaskpaneButton.Tooltip" />
              </Supertip>
              <Icon>
                <bt:Image size="16" resid="Contoso.tpicon_16x16" />
                <bt:Image size="32" resid="Contoso.tpicon_32x32" />
                <bt:Image size="80" resid="Contoso.tpicon_80x80" />
              </Icon>

              <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
              <Action xsi:type="ShowTaskpane">
                <TaskpaneId>ButtonId1</TaskpaneId>
                <!-- Provide a url resource id for the location that will be displayed on the task pane. -->
                <SourceLocation resid="Contoso.Taskpane.Url" />
              </Action>
            </Control>
          </Group>
        </OfficeTab>
      </ExtensionPoint>
    </DesktopFormFactor>

这适用于办公室365中的单词addin,不必为每个人执行插入过程。我不确定,但我认为我已经看到了类似的问题,但无论如何我都会问它。

1 个答案:

答案 0 :(得分:0)

Automatically open a task pane with a document中描述的新功能是否符合您的需求?在Office OOXML EmbedAddin

上有一个示例