Office アドイン

[Officeアドイン]Office Add-in Manifest Validatorでマニフェストファイルを検証する。

[Officeアドイン]マニフェストファイルをデバッグする方法」でマニフェストファイルを読み込んだ時のログを取る方法を紹介しましたが、今回は「Microsoft Office Add-in Manifest Validator」を使ってマニフェストファイルを検証する方法を紹介します。

Office Add-in Manifest Validatorのインストール

YO OFFICE」と同様、npmを使ってパッケージをインストールします。

npm install -g office-addin-validator

npmのインストール方法については下記記事をご参照ください。

Office Add-in Manifest Validatorの使い方

使い方は簡単で、「validate-office-addin」にマニフェストファイルを指定するだけです。

validate-office-addin my-office-add-in-manifest.xml

YO OFFICEで作成したマニフェストを検証にかけたらさっそく怒られました…。
SupportUrl要素がコメントアウトされていたのがマズかったようです。

修正&検証を繰り返した結果、無事に「Validation: Passed」になりました。

Validation: Passed
Based on the requirements specified in your manifest, your add-in can run on the following platforms; your add-in will be tested on these platforms when you submit it to the Office Store:
  - Word 2013 Service Pack 1 or later
  - Word 2016 or later
  - Word Online
  - Word 2016 for Mac
Important: This analysis is based on the requirements specified in your manifest and does not account for any runtime JavaScript calls within your add-in. For information about which API sets and features are supported on each platform, see Office Add-in host and platform availability. (https://dev.office.com/add-in-availability).

*This does not include mobile apps. You can opt-in to support mobile apps when you submit your add-in.
<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">
  <Id>9d09eb08-8488-4352-9a7c-06bea23cf2a2</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>@kinuasa</ProviderName>
  <DefaultLocale>ja-JP</DefaultLocale>
  <DisplayName DefaultValue="My Office Add-in" />
  <Description DefaultValue="My Office Add-i description." />
  <IconUrl DefaultValue="https://localhost/assets/icon-32.png" />
  <!--<HighResolutionIconUrl DefaultValue="https://localhost/assets/hi-res-icon.png" />-->
  <SupportUrl DefaultValue="https://localhost/support.html" />
  <AppDomains>
    <AppDomain>AppDomain1</AppDomain>
    <AppDomain>AppDomain2</AppDomain>
    <AppDomain>AppDomain3</AppDomain>
  </AppDomains>
  <Hosts>
    <Host Name="Document" />
  </Hosts>
  <DefaultSettings>
    <SourceLocation DefaultValue="https://localhost/index.html" />
  </DefaultSettings>
  <Permissions>ReadWriteDocument</Permissions>
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Hosts>
      <Host xsi:type="Document">
        <DesktopFormFactor>
          <GetStarted>
            <Title resid="Contoso.GetStarted.Title" />
            <Description resid="Contoso.GetStarted.Description" />
            <LearnMoreUrl resid="Contoso.GetStarted.LearnMoreUrl" />
          </GetStarted>
          <FunctionFile resid="Contoso.DesktopFunctionFile.Url" />
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <OfficeTab id="TabHome">
              <Group id="Contoso.Group1">
                <Label resid="Contoso.Group1Label" />
                <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 xsi:type="Button" id="Contoso.TaskpaneButton">
                  <Label resid="Contoso.TaskpaneButton.Label" />
                  <Supertip>
                    <Title resid="Contoso.TaskpaneButton.Label" />
                    <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>
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>ButtonId1</TaskpaneId>
                    <SourceLocation resid="Contoso.Taskpane.Url" />
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="Contoso.tpicon_16x16" DefaultValue="https://localhost/assets/icon-16.png" />
        <bt:Image id="Contoso.tpicon_32x32" DefaultValue="https://localhost/assets/icon-32.png" />
        <bt:Image id="Contoso.tpicon_80x80" DefaultValue="https://localhost/assets/icon-80.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Contoso.Taskpane.Url" DefaultValue="https://localhost/index.html" />
        <bt:Url id="Contoso.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
        <bt:Url id="Contoso.DesktopFunctionFile.Url" DefaultValue="https://localhost/function-file/function-file.html" />
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="Contoso.TaskpaneButton.Label" DefaultValue="Show Taskpane" />
        <bt:String id="Contoso.Group1Label" DefaultValue="Commands Group" />
        <bt:String id="Contoso.GetStarted.Title" DefaultValue="Get started with your sample add-in!" />
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="Contoso.TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane" />
        <bt:String id="Contoso.GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started." />
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>

Office ストアに提出する前に自分でマニフェストファイルを検証するのにとても役立つツールです。

少々判定が厳しいように思いますが、Office アドイン開発者にはお薦めのツールですので、興味がある方は是非お使いください!

【オトカドール】オトカミュージックコレクション2発売!前のページ

Women Techmakers Tokyo 2017に参加しました。次のページ

関連記事

  1. Office アドイン

    [Office用アプリ]Google ドライブでアプリを公開する方法

    今回は先日登壇した第一回 Apps for Office 勉強会の中で…

  2. Office関連

    「Excel VBAでIEを思いのままに操作できるプログラミング術」の見本誌をいただきました。

    「VBAアクションゲーム?Excel(エクセル)で動かそう!」で有名な…

  3. Office アドイン

    Office アドインの概要と開発方法を学ぶための自習書

    2018年10月27日(土)、品川の日本マイクロソフト本社で「2018…

  4. アイコン一覧

    Office 2013 アイコン一覧(D)

    ・Office 2013 アイコン一覧 NUM…

  5. アイコン一覧

    Office 2013 アイコン一覧(E)

    ・Office 2013 アイコン一覧 NUM…

  6. アイコン一覧

    Office 2013 アイコン一覧(C)

    ・Office 2013 アイコン一覧 NUM…

コメント

  • コメント (0)

  • トラックバックは利用できません。

  1. この記事へのコメントはありません。

Time limit is exhausted. Please reload CAPTCHA.

※本ページはプロモーションが含まれています。

Translate

最近の記事

アーカイブ

PAGE TOP