在桌面版Outlook中发出加载Office加载项的问题

时间:2017-12-18 14:30:12

标签: office365 outlook-addin office-js

我一直致力于为Outlook邮件构建办公室加载项。添加在Outlook的在线版本中运行良好,它也适用于Outlook移动应用程序中的移动电话。我没有看到任何原因在桌面版Outlook 2016中它不会起作用。我引用了几个示例XML文件以确保我没有遗漏任何内容。

有一次,我收到一条错误,说“Office.js尚未完全加载”,但现在我甚至无法调试它。

这是我的XML文件。

float widthRatio = renderRandomX * 1.0F / renderWidth;
float heightRatio = renderRandomY * 1.0F / renderHeight;

float offsetLLX = cropBox.getWidth() * widthRatio;
float offsetLLY = cropBox.getHeight() - cropBox.getHeight() * heightRatio;

Rectangle drawSignRect = new Rectangle(cropBox.getLeft() + cropBox.getWidth() * widthRatio,
    cropBox.getBottom() + offsetLLY,
    cropBox.getLeft() + offsetLLX + signImage.getWidth(),
    cropBox.getBottom() + offsetLLY + signImage.getHeight());

我遇到了与上述错误相关的其他一些问题,但答案要么丢失,要么不起作用。我尝试将<?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" xsi:type="MailApp"> <Id>{Id}</Id> <Version>1.0.0.0</Version> <ProviderName>Sample Add In</ProviderName> <DefaultLocale>en-US</DefaultLocale> <DisplayName DefaultValue="Outlook Add In"/> <Description DefaultValue="This app helps you work more efficiently from your email inbox."/> <IconUrl DefaultValue="logo url"/> <HighResolutionIconUrl DefaultValue="logo url"/> <SupportUrl DefaultValue="support url" /> <Hosts> <Host Name="Mailbox"/> </Hosts> <Requirements> <Sets DefaultMinVersion="1.1"> <Set Name="Mailbox" MinVersion="1.1"/> </Sets> </Requirements> <FormSettings> <Form xsi:type="ItemRead"> <DesktopSettings> <SourceLocation DefaultValue="source code"/> <RequestedHeight>350</RequestedHeight> </DesktopSettings> </Form> </FormSettings> <Permissions>ReadItem</Permissions> <Rule xsi:type="RuleCollection" Mode="And"> <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/> </Rule> <DisableEntityHighlighting>false</DisableEntityHighlighting> <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0"> <Requirements> <bt:Sets DefaultMinVersion="1.3"> <bt:Set Name="Mailbox" /> </bt:Sets> </Requirements> <Hosts> <Host xsi:type="MailHost"> <DesktopFormFactor> <FunctionFile resid="functionFile" /> <!-- Message read form --> <ExtensionPoint xsi:type="MessageReadCommandSurface"> <OfficeTab id="TabDefault"> <Group id="msgReadDemoGroup"> <Label resid="groupLabel" /> <!-- Task pane button --> <Control xsi:type="Button" id="msgReadOpenPaneButton"> <Label resid="groupLabel" /> <Supertip> <Title resid="groupLabel" /> <Description resid="paneReadSuperTipDescription" /> </Supertip> <Icon> <bt:Image size="16" resid="blue-icon-32" /> <bt:Image size="32" resid="blue-icon-32" /> <bt:Image size="80" resid="blue-icon-32" /> </Icon> <Action xsi:type="ShowTaskpane"> <SourceLocation resid="readTaskPaneUrl" /> </Action> </Control> </Group> </OfficeTab> </ExtensionPoint> </DesktopFormFactor> </Host> </Hosts> <Resources> <bt:Images> <bt:Image id="blue-icon-32" DefaultValue="icon" /> </bt:Images> <bt:Urls> <bt:Url id="readTaskPaneUrl" DefaultValue="source code" /> </bt:Urls> <bt:ShortStrings> <bt:String id="groupLabel" DefaultValue="label" /> </bt:ShortStrings> <bt:LongStrings> <bt:String id="paneReadSuperTipDescription" DefaultValue="long description" /> </bt:LongStrings> </Resources> <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1"> <Requirements> <bt:Sets DefaultMinVersion="1.3"> <bt:Set Name="Mailbox" /> </bt:Sets> </Requirements> <Hosts> <Host xsi:type="MailHost"> <DesktopFormFactor> <FunctionFile resid="functionFile" /> <!-- Message read form --> <ExtensionPoint xsi:type="MessageReadCommandSurface"> <OfficeTab id="TabDefault"> <Group id="msgReadDemoGroup"> <Label resid="groupLabel" /> <!-- Task pane button --> <Control xsi:type="Button" id="msgReadOpenPaneButton"> <Label resid="groupLabel" /> <Supertip> <Title resid="groupLabel" /> <Description resid="paneReadSuperTipDescription" /> </Supertip> <Icon> <bt:Image size="16" resid="blue-icon-32" /> <bt:Image size="32" resid="blue-icon-32" /> <bt:Image size="80" resid="blue-icon-32" /> </Icon> <Action xsi:type="ShowTaskpane"> <SourceLocation resid="readTaskPaneUrl" /> </Action> </Control> </Group> </OfficeTab> </ExtensionPoint> </DesktopFormFactor> <MobileFormFactor> <ExtensionPoint xsi:type="MobileMessageReadCommandSurface"> <Group id="mobileMsgRead"> <Label resid="groupLabel" /> <Control xsi:type="MobileButton" id="TaskPaneBtn"> <Label resid="groupLabel" /> <Icon xsi:type="bt:MobileIconList"> <bt:Image size="25" scale="1" resid="blue-icon-32" /> <bt:Image size="25" scale="2" resid="blue-icon-32" /> <bt:Image size="25" scale="3" resid="blue-icon-32" /> <bt:Image size="32" scale="1" resid="blue-icon-32" /> <bt:Image size="32" scale="2" resid="blue-icon-32" /> <bt:Image size="32" scale="3" resid="blue-icon-32" /> <bt:Image size="48" scale="1" resid="blue-icon-32" /> <bt:Image size="48" scale="2" resid="blue-icon-32" /> <bt:Image size="48" scale="3" resid="blue-icon-32" /> </Icon> <Action xsi:type="ShowTaskpane"> <SourceLocation resid="readTaskPaneUrl" /> </Action> </Control> </Group> </ExtensionPoint> </MobileFormFactor> </Host> </Hosts> <Resources> <bt:Images> <bt:Image id="blue-icon-32" DefaultValue="icon" /> </bt:Images> <bt:Urls> <bt:Url id="readTaskPaneUrl" DefaultValue="source code" /> </bt:Urls> <bt:ShortStrings> <bt:String id="groupLabel" DefaultValue="label" /> </bt:ShortStrings> <bt:LongStrings> <bt:String id="paneReadSuperTipDescription" DefaultValue="long description" /> </bt:LongStrings> </Resources> </VersionOverrides> </VersionOverrides> </OfficeApp> 添加到import 'core-js/client/shim';,但这完全破坏了应用程序。

我错过了一些明显的东西吗?

修改

以下是我的polyfills.ts文件:

main.ts

0 个答案:

没有答案