旁加载 Outlook javascript 加载项

Side loading an Outlook javascript add-in

我在开始为 Outlook 创建加载项时遇到了麻烦。我想使用新的 html/javascript/manifest 方法。我已经能够创建一个与 outlook.live.com 配合良好的清单和应用程序。我完全陷入困境的地方是桌面 Outlook。如何 install/debug 我的加载项与桌面 Outlook 一起使用?

我在 UI 中找不到任何可以让我添加这种加载项样式的内容。此外 Microsoft documentation 并没有让事情变得更清楚。他们的文档似乎暗示只有在连接到 Exchange 服务器时才可能使用这种类型的加载项。

如有任何帮助,我们将不胜感激。

是的,只有当您的邮箱是 Exchange 时,加载项才会加载到 Outlook 桌面上。我不确定加载项是否适用于个人 Microsoft 帐户(例如 hotmail.com、outlook.com)和 Office 桌面。请记住,对个人帐户的邮件插件的支持是比较新的(2016 年 3 月正式宣布)。

要开发您的加载项,我建议您使用组织帐户(即 Office365 帐户)。对组织帐户的支持已于 2013 年发布,是一个更成熟的解决方案,供您入门。您可以在 dev.office.com.

拥有一个免费的开发帐户

编辑:2016 年 10 月 个人帐户现在由 "Personal mailbox accounts" 又名 outlook.com 帐户

支持

请记住,邮件加载项不是安装在邮件客户端(桌面、OWA)上,而是安装在邮件帐户上。当您 "install" 一个加载项时,您只在您的邮箱中设置一个 xml 文件,基本上是 "there is a web add-in out there called X and that is served at this url..."。然后,如果您在邮箱 smaccell@mytestcompany.onmicrosoft.com 上安装加载项 X,无论您是使用 Outlook Web Access (OWA) 还是 Outlook 桌面查看邮箱,此加载项都将加载加载项 Web iframe。

要为一个用户邮件帐户安装加载项,您必须使用 Outlook Web Access。看到这个 blog post. Note also that you can install the add-in for the whole organisation (Admin > Exchange Admin > Add-ins). Finally, Visual Studio is also able to push the manifest to your office 365 mailbox. To have this you need Office Development Tools.

为了在 Outlook 桌面中进行调试,我知道两种方法。

  1. 将 Office 开发工具与 visual studio 结合使用 和 select 您的示例加载项项目作为 'Starting project' 和属性 select 'Office Desktop'。
  2. 纯网络开发。 就个人而言,我并没有真正使用 Office 开发工具。我使用“https://localhost:XXXX" for url and I start the web project on IIS express to do the debugging. For stepping into the source code, I use the debugger of my browser (Chrome, Edge, IE etc.) when browsing in OWA. When I need to step into source code specifically on Desktop (For windows or for Mac) I use Vorlon.js see also this blog post 手动安装我的加载项。 我的建议也是 test/debug 经常使用 IE 11(在 Win10 中仍然可用!)和 OWA。事实上,Office Desktop 内部使用的加载项浏览器是 IE。