2017-01-15 2 views
1

Я разрабатываю Office addin для Outlook. Сейчас я просто пытаюсь добавить кнопку на ленту, которая должна открыть TaskPane справа, но я не могу заставить ее работать. Вот мой манифест:Кнопка добавления надстройки Outlook не отображается

<?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" xsi:type="MailApp"> 

    <Id>1bf213f9-65a5-4395-aef8-239d72c7e509</Id> 
    <Version>1.0.0.0</Version> 
    <ProviderName>myProviderName</ProviderName> 
    <DefaultLocale>en-US</DefaultLocale> 
    <DisplayName DefaultValue="myDisplayName" /> 
    <Description DefaultValue="myDescription"/> 
    <Hosts> 
    <Host Name="Mailbox" /> 
    </Hosts> 
    <Requirements> 
    <Sets> 
     <Set Name="MailBox" MinVersion="1.1" /> 
    </Sets> 
    </Requirements> 
    <FormSettings> 
    <Form xsi:type="ItemEdit"> 
     <DesktopSettings> 
     <SourceLocation DefaultValue="https://hiddenurl/app/index.html" /> 
     </DesktopSettings> 
    </Form> 
    </FormSettings> 

    <Permissions>ReadWriteItem</Permissions> 

    <Rule xsi:type="RuleCollection" Mode="Or"> 
    <Rule xsi:type="ItemIs" FormType="Edit" ItemType="Message"/> 
    </Rule> 
    <DisableEntityHighlighting>false</DisableEntityHighlighting> 

    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" 
        xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" 
        xsi:type="VersionOverridesV1_0"> 
    <Hosts> 
     <Host xsi:type="MailHost"> 
     <DesktopFormFactor> 
      <ExtensionPoint xsi:type="MessageComposeCommandSurface"> 
      <OfficeTab id="TabDefault"> 
       <Group id="mainGroup"> 
       <Label resid="groupLabel"/> 
       <Tooltip resid="groupsTooltip"/> 

       <Control xsi:type="Button" id="button"> 
        <Label resid="buttonLabel"/> 
        <Tooltip resid="buttonTooltip"/> 
        <Supertip> 
        <Title resid="superTipTitle"/> 
        <Description resid="superTipDescription"/> 
        </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="taskPaneUrl" /> 
        </Action> 
       </Control> 
       </Group> 
      </OfficeTab> 
      </ExtensionPoint> 
     </DesktopFormFactor> 
     </Host> 
    </Hosts> 
    <Resources> 
     <bt:Images> 
     <bt:Image id="icon16" DefaultValue="https://hiddenurl/assets/icons/icon_16.png" /> 
     <bt:Image id="icon32" DefaultValue="https://hiddenurl/assets/icons/icon_32.png" /> 
     <bt:Image id="icon80" DefaultValue="https://hiddenurl/assets/icons/icon_80.png" /> 
     </bt:Images> 
     <bt:Urls> 
     <bt:Url id="taskPaneUrl" DefaultValue="https://hiddenurl/app/index.html" /> 
     </bt:Urls> 
     <bt:ShortStrings> 
     <bt:String id="tabLabel" DefaultValue="tabLabel" /> 
     <bt:String id="groupLabel" DefaultValue="groupLabel" /> 
     <bt:String id="groupsTooltip" DefaultValue="groupsTooltip" /> 
     <bt:String id="buttonLabel" DefaultValue="buttonLabel" /> 
     <bt:String id="buttonTooltip" DefaultValue="buttonTooltip" /> 
     <bt:String id="superTipTitle" DefaultValue="superTipTitle" /> 
     <bt:String id="superTipDescription" DefaultValue="superTipDescription" /> 
     </bt:ShortStrings> 
    </Resources> 
    </VersionOverrides> 
</OfficeApp> 

Я ожидаю увидеть кнопку на ленте с моим логотипом, который я должен быть в состоянии нажать, а затем увидеть TaskPane справа. Однако я вижу, что ни одна кнопка не отображается, а в надстройках Office -> My Add-ins мой аддон даже не отображается.

Если я удалю весь блок VersionOverrides в манифесте, надстройка появится в разделе «Надстройки Office -> Мои надстройки», и я могу получить доступ к моей панели задач.

Я пытался следовать этим примерам без успеха:

https://github.com/jasonjoh/command-demo/blob/master/command-demo-manifest.xml

http://simonjaeger.com/building-office-add-in-commands/

Любой вход на это будет наиболее ценится!

/Max

ответ

1

Ваш раздел ресурс не отформатирован. Пожалуйста, обновите к следующему, и все будет работать, как вы просили ...

<Resources> 
    <bt:Images> 
    <bt:Image id="icon16" DefaultValue="https://hiddenurl/assets/icons/icon_16.png" /> 
    <bt:Image id="icon32" DefaultValue="https://hiddenurl/assets/icons/icon_16.png" /> 
    <bt:Image id="icon80" DefaultValue="https://hiddenurl/assets/icons/icon_16.png" /> 
    </bt:Images> 
    <bt:Urls> 
    <bt:Url id="taskPaneUrl" DefaultValue="https://hiddenurl/app/index.html" /> 
    </bt:Urls> 
    <bt:ShortStrings> 
    <bt:String id="tabLabel" DefaultValue="tabLabel" /> 
    <bt:String id="groupLabel" DefaultValue="groupLabel" /> 
    <bt:String id="buttonLabel" DefaultValue="buttonLabel" /> 
    <bt:String id="superTipTitle" DefaultValue="superTipTitle" /> 
    </bt:ShortStrings> 
    <bt:LongStrings> 
    <bt:String id="buttonTooltip" DefaultValue="buttonTooltip" /> 
    <bt:String id="groupsTooltip" DefaultValue="groupsTooltip" /> 
    <bt:String id="superTipDescription" DefaultValue="superTipDescription" /> 
    </bt:LongStrings> 
</Resources> 

Вы должны добавить «IconUrl» и «HighResolutionIconUrl» в разделе «OfficeApp» для поддержки клиентов, которые ничего о «VersionOverridesV1_0» не знают. эти два узла должны появиться после «Описание». Если вы отправите свое приложение в Office Store в будущем, вам потребуется добавить узел «SupportUrl» после «HighResolutionIconUrl».

Имейте в виду, что все внутри файла манифеста строго по схемам и должно быть действительным.