【发布时间】:2019-06-06 09:15:25
【问题描述】:
我有一个 Outlook 插件,可以在按下命令按钮时重定向到外部网站。在 Office Outlook Online 中一切正常,但在 Office Outlook 桌面上,该命令未执行。为什么会这样?
插件托管在基于 Ubuntu 14.04 的 node.js 服务器上,并具有有效的 https 证书。如果我使用按钮从任务窗格调用相同的命令,则会执行该命令并重定向用户。
我在设置服务器时遇到了很多问题,但现在服务器正在运行并且可以毫无问题地访问文件。 我认为这可能是我的自签名证书有问题,并将其更改为来自受信任来源的证书,但输出是相同的。 但是,在本地运行它,就像从我的 Windows 系统启动本地 node.js 服务器并通过 localhost 调用它一样。正在执行命令。
我希望 Outlook 桌面中命令按钮的命令的执行方式类似于它在 Outlook Web 中的执行方式。 它不显示任何错误消息。 notificationMessage 只是一直告诉我它当前正在执行命令,但什么都没有发生,甚至没有改变。 我必须通过关闭窗口来强制任务停止。
我看到其他人提到了类似的问题 (How to get 'Commands' button working in Office Addins?),但它的答案对我的问题没有帮助。
在基于 ubuntu 的 nodejs 服务器上托管我的插件时,该命令未在 Outlook 桌面上执行是我的问题。 如果有人知道如何解决这个问题或者看到有人遇到同样的问题,我会非常感激,这可以解决它。
谢谢。
清单.xml (出于保密原因,真实的服务器名称被交换为“ourServer”bc。) GotoSite -> window.open("https://google.com")
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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>0ec8dc72-014b-4426-acd3-f06edeb15052</Id>
<Version>1.0.0.0</Version>
<ProviderName>Convien</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Convien"/>
<Description DefaultValue="Come together... right now!"/>
<IconUrl DefaultValue="https://ourServer.convien.com:3000/assets/Convien32X32.png"/>
<HighResolutionIconUrl DefaultValue="https://ourServer.convien.com:3000/assets/Convien80X80.png"/>
<SupportUrl DefaultValue="https://convien.com"/>
<AppDomains>
<AppDomain>convien.com</AppDomain>
<AppDomain>https://easy.convien.com</AppDomain>
<AppDomain>https://www.google.com</AppDomain>
<AppDomain>https://stress.convien.com/convien_outlook/</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Mailbox"/>
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1"/>
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="https://ourServer.convien.com:3000/src/taskpane/taskpane.html"/>
<RequestedHeight>250</RequestedHeight>
</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>
<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="Commands.Url"/>
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgReadGroup">
<Label resid="GroupLabel"/>
<Control xsi:type="Button" id="linkButton">
<Label resid="LinkButton.Label"/>
<Supertip>
<Title resid="LinkButton.Label"/>
<Description resid="LinkButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.80x80"/>
<bt:Image size="32" resid="Icon.80x80"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>GotoSite</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://ourServer.convien.com:3000/assets/Convien80X80.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://ourServer.convien.com:3000/assets/Convien80X80.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://ourServer.convien.com:3000/assets/Convien80X80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Commands.Url" DefaultValue="https://ourServer.convien.com:3000/src/commands/commands.html"/>
<bt:Url id="Taskpane.Url" DefaultValue="https://ourServer.convien.com:3000/src/taskpane/taskpane.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="GroupLabel" DefaultValue="Meeting Place"/>
<bt:String id="LinkButton.Label" DefaultValue="Convien Easy"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="LinkButton.Tooltip" DefaultValue="Opens Convien Easy web application."/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
【问题讨论】:
-
你能分享你的清单吗?
-
当然。我更新了问题。
-
当你说它在 Office Online 中工作时 - 你使用的是什么浏览器?尝试 IE 并在 Dev Tools (F12) 中查看控制台,IE 经常需要 polyfill,Office Desktop Addins 是 IE 包装器
-
@LeonardoSeccia 感谢您提供有关 IE 的提示。它有助于使用 IE 进行调试,因为我一直在使用 Firefox。
标签: javascript node.js outlook office-js outlook-web-addins