简体   繁体   中英

Can't <ExtensionPoint xsi: type = "Events"> be used with other extension points in the outlook addin manifest?

<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<Hosts>
  <Host xsi:type="MailHost">
    <DesktopFormFactor>
      <FunctionFile resid="functionFile" />
      <ExtensionPoint xsi:type="MessageComposeCommandSurface">
        <OfficeTab id="TabDefault2">
          <Group id="msgWriteGroup">
            <Label resid="groupLabel" />
            <Control xsi:type="Button" id="msgWriteOpenPaneButton">
              <Label resid="paneReadButtonLabel" />
              <Supertip>
                <Title resid="paneReadSuperTipTitle" />
                <Description resid="paneReadSuperTipDescription" />
              </Supertip>
              <Icon>
                <bt:Image size="16" resid="icon16" />
                <bt:Image size="32" resid="icon32" />
                <bt:Image size="80" resid="icon80" />
              </Icon>
              <Action xsi:type="ShowTaskpane">
                <SourceLocation resid="messageReadTaskPaneUrl" />
              </Action>
            </Control>
          </Group>
        </OfficeTab>
      </ExtensionPoint>
    </DesktopFormFactor>
  </Host>
</Hosts>
<Resources>
  <bt:Images>
    <bt:Image id="icon16" DefaultValue="https://localhost:4200/assets/images/icon-32.png"/>
    <bt:Image id="icon32" DefaultValue="https://localhost:4200/assets/images/icon-32.png"/>
    <bt:Image id="icon80" DefaultValue="https://localhost:4200/assets/images/icon-32.png"/>
  </bt:Images>
  <bt:Urls>
    <bt:Url id="functionFile" DefaultValue="https://localhost:44383/"/>
    <bt:Url id="messageReadTaskPaneUrl" DefaultValue="https://localhost:44383"/>
  </bt:Urls>
  <bt:ShortStrings>
    <bt:String id="customTabLabel"  DefaultValue="My Add-in Tab"/>
  </bt:ShortStrings>
</Resources>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
  <Hosts>
    <Host xsi:type="MailHost">
      <DesktopFormFactor>
        <FunctionFile resid="residUILessFunctionFileUrl" />
        <ExtensionPoint xsi:type="Events">
          <Event Type="ItemSend" FunctionExecution="synchronous" FunctionName="validateBody" />
        </ExtensionPoint>
      </DesktopFormFactor>
    </Host>
  </Hosts>
  <Resources>
    <bt:Urls>
      <bt:Url id="residUILessFunctionFileUrl" DefaultValue="https://localhost:4200/on-send" ></bt:Url>
    </bt:Urls>
  </Resources>
</VersionOverrides>

Hi. The code above is my Outlook addin manifest.

I see the Add-in button on the ribbon button at the top of the mail compose window, and I want to use the On-Send event as well.

So I merged the manifest, the onsend event works, but the button doesn't appear in the compose window.

Can't I use and together?

Both the Ribbon Button and the OnSend Event needs to be Version Overrides 1.1. The 1.1 section will completely override the 1.0 section when applicable.

You probably want to put the Ribbon Button in both 1.1 and 1.0, and the OnSend Event in just the 1.1 section.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM