0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Office Add-inで複数のExtensionPointを設定する

Last updated at Posted at 2025-06-02

やりたいこと

マニフェスト ファイルの ExtensionPoint 要素 - Office Add-ins | Microsoft Learn

Outlook Add-inを会議イベントの主催者と参加者の両方の画面で利用するために ExtensionPoint を両方に指定したい。
単純に ExtensionPoint ブロックを複製すると Sideloading rejected by Exchange のエラーに引っかかりました。

解決方法

      <!-- 省略 -->
      <Hosts>
        <Host xsi:type="MailHost">
          <DesktopFormFactor>
            <FunctionFile resid="Commands.Url"/>

            <!-- 会議の参加者向け(主催者除く)に表示するもの -->
            <ExtensionPoint xsi:type="AppointmentAttendeeCommandSurface">
              <OfficeTab id="TabDefaultForMembers">
                <Group id="msgComposeGroupForMembers">
                  <Label resid="GroupLabel"/>
                  <Control xsi:type="Button" id="msgComposeOpenPaneButtonForMembers">
                    <Label resid="SearchPJCodeForMembers.Label"/>
                    <Supertip>
                      <Title resid="SearchPJCodeForMembers.Label"/>
                      <Description resid="SearchPJCodeForMembers.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <!-- 省略 -->
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="SearchPJCodeForMembers.Url"/>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>

            <!-- 会議主催者向けに表示するもの -->
            <ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
              <OfficeTab id="TabDefaultForOrganizer">
                <Group id="msgComposeGroupForOrganizer">
                  <Label resid="GroupLabel"/>
                  <Control xsi:type="Button" id="msgComposeOpenPaneButtonForOrganizer">
                    <Label resid="SearchPJCodeForOrganizer.Label"/>
                    <Supertip>
                      <Title resid="SearchPJCodeForOrganizer.Label"/>
                      <Description resid="SearchPJCodeForOrganizer.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <!-- 省略 -->
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="SearchPJCodeForOrganizer.Url"/>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
          </DesktopFormFactor>
        </Host>
      </Hosts>
      <!-- 省略 -->
      <Resources>
        <bt:Urls>
          <bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html"/>
          <bt:Url id="SearchPJCodeForOrganizer.Url" DefaultValue="https://localhost:3000/search-pj-code.html"/>
          <bt:Url id="SearchPJCodeForMembers.Url" DefaultValue="https://localhost:3000/search-pj-code.html"/>
        </bt:Urls>
      </Resources>
      <!-- 省略 -->

必要な部分のみの抜粋ですが、 ExtensionPoint ブロックを2つ作ることと、その内部で使う id はそれぞれのブロックごとに変える( id は重複禁止のため)ようにすれば、会議主催者と参加者の両方の会議イベントでアドインを利用できます。
residResource ID の略称でスキーマで予約済のIDのようなので、resid は複数個所で使う場合も同じ resid を使うことになります。
id に使う値で ~ForOrganizer は会議主催者向けで、 ~ForMembers は会議参加者向けを意図していますが、特に名称のルール決まりはないとおもいます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?