2016-07-20 8 views
2

私はオフィスで働いています。2016 & Office 365アドインは、javascriptとXMLマニフェストファイルを使用しています。オンラインでマニフェストを読み込むと、すべて正常に動作します。タブを作成し、そのタブに、マニフェストファイルにリストされているHTMLファイルに添付されているjavascriptファイルの関数を呼び出すボタンを配置します。Wordアドインでリボンにボタンが作成されていません

ただし、このアドインを単語2016(Windowsデスクトップの場合)に読み込むと機能しません。実際、ボタンで新しいタブを作成するのではなく、サイドペインを開きます。ここでは、デスクトップ用の単語にアドインを読み込む手順(Windowsの場合はWord 2016で試してください)の下にあるOffice Dev Center - Docs - Build Your First Word Add-inの手順を示した文書を示します。私のXMLファイルのスニペットについては以下を参照してください。

私は全く同じ問題をthisとしています。私は正確に何をしたのですか?this質問の応答が示唆しているが、動作しません。 (元から修正)

XML:

<?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>*-*-*-*-*</Id> 

<Version>1.0.0.0</Version> 
<ProviderName>Contoso</ProviderName> 
<DefaultLocale>en-US</DefaultLocale> 

<DisplayName DefaultValue="Contoso" /> 
<Description DefaultValue="Contoso"/> 

<IconUrl DefaultValue="https://*" /> 

<AppDomains> 
    <AppDomain>AppDomain1</AppDomain> 
    <AppDomain>AppDomain2</AppDomain> 
    <AppDomain>AppDomain3</AppDomain> 
</AppDomains> 

<Hosts> 
    <Host Name="Document" /> 
</Hosts> 
<DefaultSettings> 
    <SourceLocation DefaultValue="https://*" /> 
</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"> 
      <CustomTab id="contoso.Tab"> 
      <Group id="contoso.Events"> 
       <Label resid="contoso.EventsLabel" /> 
       <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.EventButton"> 
       <Label resid="contoso.EventButton.Label" /> 
       <Supertip> 
        <Title resid="contoso.EventButton.Label" /> 
        <Description resid="contoso.EventButton.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="ExecuteFunction"> 
        <FunctionName>openEventWindow</FunctionName> 
       </Action> 
       </Control> 
      </Group> 
      <Label resid="contoso.Tab.Label" /> 
      </CustomTab> 
     </ExtensionPoint> 
     </DesktopFormFactor> 
    </Host> 
    </Hosts> 

    <Resources> 
    <bt:Images> 
     <bt:Image id="contoso.tpicon_16x16" DefaultValue="https://*" /> 
     <bt:Image id="contoso.tpicon_32x32" DefaultValue="https://*" /> 
     <bt:Image id="contoso.tpicon_80x80" DefaultValue="https://*" /> 
    </bt:Images> 
     <bt:Urls> 
     <bt:Url id="contoso.DesktopFunctionFile.Url" DefaultValue="https://*" /> 
     <bt:Url id="contoso.GetStarted.LearnMoreUrl" DefaultValue="https://*" /> 
    </bt:Urls> 

    <bt:ShortStrings> 
     <bt:String id="contoso.Tab.Label" DefaultValue="Contoso" /> 
     <bt:String id="contoso.EventButton.Label" DefaultValue="Add to Event" /> 
     <bt:String id="contoso.EventsLabel" DefaultValue="Events" /> 
     <bt:String id="contoso.GetStarted.Title" DefaultValue="Get started with Contoso!" /> 
    </bt:ShortStrings> 

    <bt:LongStrings> 
     <bt:String id="contoso.EventButton.Tooltip" DefaultValue="Click to browse the active events" /> 
     <bt:String id="contoso.GetStarted.Description" DefaultValue="The contoso Add In has loaded successfully!" /> 
    </bt:LongStrings> 
    </Resources> 
</VersionOverrides> 

</OfficeApp> 

注:これは私は、Word 365に期待するような作品で、追加しますが、Wordで2016誰もが任意のアイデアを持っていませんか? Office 2016のインストール時に変更する必要があるオプションがありますか。

答えて

1

アドインコマンド(リボンカスタマイズ)は、Office 2016 RTMでは使用できませんでした。その代わりに、数ヶ月後に機能が追加され、毎月のビルドで繰り返し、改善され続けています。

Office 2016 RTMをお持ちの場合(Office 365サブスクリプションと「常緑」オフィスの一部としてではなく、スタンドアロン版としてディスク/ MSIインストールとして購入した場合など)は、アドインコマンドが有効になっています。

「ファイル」 - >「アカウント」に移動すると、どのバージョン番号が表示されますか?

enter image description here

+0

私のオフィスバージョンは16.0.6741.2048です。私はOffice 365 ProPlusサブスクリプションを持っています。 –

+0

@ RyanAndrews:Officeのインストールをアップグレードするとどんな成功? –

+1

@RyanAndrews:[Officeアドインコマンドのサンプル](https://github.com/OfficeDev/Office-Add-in-Commands-Samples)のドキュメントには、必要最小限のバージョンが16.0.6769.0000以上であることが記載されています16.0.6868.0000を推奨します)。 –

関連する問題