Outlook 365加载项仅出现在Outlook 2013客户端中

时间:2016-01-28 18:57:26

标签: xml office365 office365-apps office-js outlook-2016

我有一个问题是在Outlook 2016中显示我的加载项。我将它开发为Office365加载项,它就像Outlook 2013中的一个魅力。但当时我想在Outlook 2016中测试它不会显示在“Apps for Office”部分中。

我想我必须在manifest.xml中添加一些东西,但我不知道是什么。在Outlook 2013中,它会在右上角打开一个任务窗格。如果它在Outlook 2016中是相同的,那就太好了。

我的Outlook 2013/2016加载项.XML如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<!--Created:someid-->
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="MailApp">
  <Id>someid</Id>
  <Version>0.0.1.0</Version>
  <ProviderName>Teamname</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Name" />
  <Description DefaultValue="Name"/>
  <!-- Logo einfügen -->
  <HighResolutionIconUrl DefaultValue="https://pl.vc/tmvl" />
  <Hosts>
    <Host Name="Mailbox" />
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="MailBox" MinVersion="1.1" />
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://urltowebapp/#/outlook-login"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
    <Form xsi:type="ItemEdit">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://urltowebapp/#/outlook-login"/>
      </DesktopSettings>
    </Form>
  </FormSettings>
  <Permissions>ReadWriteItem</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit" />
    <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Edit" />
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
    <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read" />
  </Rule>
  <DisableEntityHighlighting>false</DisableEntityHighlighting>
</OfficeApp>

1 个答案:

答案 0 :(得分:2)

我想与你们分享我的解决方案,他们可能遇到同样的问题。

这是我的var ta_message = document.getElementById('ta_message'); var ta_result = document.getElementById('ta_result'); function emits ( who, who_ ) {return function ( x ) { who.innerHTML = [who.innerHTML, who_ + " emits " + JSON.stringify(x)].join("\n"); };} function pushValue (arr, el){arr.push(el); return arr;} var sourceCounter = 0; var samplerCounter = 0; var source$ = Rx.Observable .fromEvent(document.getElementById('source'), 'click') .map(function(){return sourceCounter++;}) .do(emits(ta_source, 'source')) .share(); var sampler$ = Rx.Observable .fromEvent(document.getElementById('sampler'), 'click') .map(function(){return String.fromCharCode(65+samplerCounter++);}) .do(emits(ta_sampler, 'sampler')) .share(); var bufferedSource$ = sampler$ .startWith('0') .flatMapLatest(function (x){ console.log("x",x) return source$.scan(pushValue,[]) }) .do(emits(ta_sampler, 'bufferedSource$')); var sampledSource$ = bufferedSource$ .sample(sampler$) .do(emits(ta_result, 'sampledSource')) .withLatestFrom(sampler$, function (bufferedValues, samplerValue){ return "" +samplerValue + bufferedValues; }) .do(emits(ta_result, 'result')) //sampler$.connect(); sampledSource$.subscribe(function(){}); 文件,它完全符合我的需要:

Manifest-XML

除了<?xml version="1.0" encoding="UTF-8"?> <!--Created: <SOME ID> --> <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:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp"> <Id> <SOME ID> </Id> <Version>1.0.0.0</Version> <ProviderName>[Provider Name]</ProviderName> <DefaultLocale>en-US</DefaultLocale> <DisplayName DefaultValue="AppName" /> <Description DefaultValue="Some text"/> <!-- Logo einfügen --> <HighResolutionIconUrl DefaultValue="<Link to your app logo>" /> <Hosts> <Host Name="Mailbox" /> </Hosts> <Requirements> <Sets> <Set Name="MailBox" MinVersion="1.1" /> </Sets> </Requirements> <FormSettings> <Form xsi:type="ItemEdit"> <DesktopSettings> <SourceLocation DefaultValue="<Link to your web app>"/> </DesktopSettings> </Form> </FormSettings> <Permissions>ReadWriteItem</Permissions> <Rule xsi:type="RuleCollection" Mode="Or"> <Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit" /> <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Edit" /> </Rule> <DisableEntityHighlighting>false</DisableEntityHighlighting> <!-- code to support Outlook 2016 --> <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0"> <Description resid="residDescription" /> <Requirements> <bt:Sets DefaultMinVersion="1.3"> <bt:Set Name="Mailbox" /> </bt:Sets> </Requirements> <Hosts> <Host xsi:type="MailHost"> <DesktopFormFactor> <!-- <FunctionFile resid="functionFile" /> add this if you need to --> <ExtensionPoint xsi:type="MessageComposeCommandSurface"> <OfficeTab id="TabDefault"> <Group id="msgreadTabMessage.grp1"> <Label resid="groupLabel" /> <Tooltip resid="groupTip" /> <Control xsi:type="Button" id="msgreadTabMessage.grp1.btnView"> <Label resid="buttonLabel" /> <Tooltip resid="buttonTip" /> <Supertip> <Title resid="superTipTitle" /> <Description resid="superTip" /> </Supertip> <Icon> <bt:Image size="16" resid="icon1_16x16" /> <bt:Image size="32" resid="icon1_32x32" /> <bt:Image size="80" resid="icon1_80x80" /> </Icon> <Action xsi:type="ShowTaskpane"> <SourceLocation resid="taskPaneUrl" /> </Action> </Control> </Group> </OfficeTab> </ExtensionPoint> </DesktopFormFactor> </Host> </Hosts> <Resources> <bt:Images> <bt:Image id="icon1_16x16" DefaultValue="<link to your 16px logo>"/> <bt:Image id="icon1_32x32" DefaultValue="<link to your 32px logo>"/> <bt:Image id="icon1_80x80" DefaultValue="<link to your 80px logo>"/> </bt:Images> <bt:Urls> <!-- <bt:Url id="functionFile" DefaultValue="<link to your function file if you need one>"/> --> <bt:Url id="taskPaneUrl" DefaultValue="<link to your web application>"/> </bt:Urls> <bt:ShortStrings> <bt:String id="groupLabel" DefaultValue="Some text"/> <bt:String id="buttonLabel" DefaultValue="Some text"/> <bt:String id="superTipTitle" DefaultValue="Some text"/> </bt:ShortStrings> <bt:LongStrings> <bt:String id="residDescription" DefaultValue="Some text" /> <bt:String id="groupTip" DefaultValue="Some text"/> <bt:String id="buttonTip" DefaultValue="Some text"/> <bt:String id="superTip" DefaultValue="Some text"/> </bt:LongStrings> </Resources> </VersionOverrides> <!-- end of code to support Outlook 2016 --> </OfficeApp> - 评论之间的代码之外,您还必须确保在&#39; OfficeApp标记中添加另外2行:

code to support Outlook 2016

我尽量使这个xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" 尽可能通用,这样您就可以轻松地将它应用到您自己的项目中。