【问题标题】:Running my Outlook add-in in OWA在 OWA 中运行我的 Outlook 加载项
【发布时间】:2018-07-04 00:04:04
【问题描述】:

我为 Outlook 制作了一个加载项。它将两个命令按钮添加到功能区,单击时会打开具有特定 URL 的任务窗格。这在 Outlook 的桌面版本中运行良好,但我不知道如何以及是否可以让它在 Outlook 的在线版本中运行。 MS 文档暗示 OWA 支持加载项,但我找不到明确的示例(清单)。当我转到outlook.office.com时,点击选项按钮,然后点击“管理加载项”,加载项列在“我的加载项”下,但只有一个“卸载”按钮,没有打开/就像我使用 GIPHY 插件一样关闭切换。

我的清单中是否缺少某些内容? (为了完整起见,包括在下面)

<?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" xsi:type="MailApp" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0">
    <Id>1e38cb9a-2367-47b9-96b5-8b054dfdd293</Id>
    <Version>1.0.0.0</Version>
    <ProviderName>ProviderName</ProviderName>
    <DefaultLocale>en-US</DefaultLocale>
    <DisplayName DefaultValue="DisplayName"/>
    <Description DefaultValue="Description"/>
    <HighResolutionIconUrl DefaultValue="https://localhost:10084/officeAddIn/icon128.png"/>
    <SupportUrl DefaultValue="http://www.something.com" />
    <Hosts>
        <Host Name="Mailbox"/>
    </Hosts>
    <Requirements>
        <Sets>
            <Set Name="MailBox" MinVersion="1.1"/>
        </Sets>
    </Requirements>
    <FormSettings>
        <Form xsi:type="ItemRead">
            <DesktopSettings>
                <SourceLocation DefaultValue="https://localhost:10084/officeAddIn/app/home.html"/>
                <RequestedHeight>250</RequestedHeight>
            </DesktopSettings>
        </Form>
    </FormSettings>
    <Permissions>ReadItem</Permissions>
    <Rule xsi:type="RuleCollection" Mode="Or">
        <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
        <Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit"/>
    </Rule>

    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
        <Hosts>
            <Host xsi:type="MailHost">
                <DesktopFormFactor>
                    <ExtensionPoint xsi:type="MessageReadCommandSurface">
                        <OfficeTab id="TabDefault">
                            <Group id="gv.store">
                                <Label resid="gv.label.store" />

                                <Control xsi:type="Button" id="gv.newasebtn">
                                    <Label resid="gv.label.newcase" />
                                    <Supertip>
                                        <Title resid="gv.label.newcase" />
                                        <Description resid="gv.descr.newcase" />
                                    </Supertip>
                                    <Icon>
                                        <bt:Image size="16" resid="gv.icon.16" />
                                        <bt:Image size="32" resid="gv.icon.32" />
                                        <bt:Image size="80" resid="gv.icon.80" />
                                    </Icon>
                                    <Action xsi:type="ShowTaskpane">
                                        <SourceLocation resid="gv.url.new_case" />
                                    </Action>
                                </Control>

                                <Control xsi:type="Button" id="gv.existingcasebtn">
                                    <Label resid="gv.label.existingcase" />
                                    <Supertip>
                                        <Title resid="gv.label.existingcase" />
                                        <Description resid="gv.descr.existingcase" />
                                    </Supertip>
                                    <Icon>
                                        <bt:Image size="16" resid="gv.icon.16" />
                                        <bt:Image size="32" resid="gv.icon.32" />
                                        <bt:Image size="80" resid="gv.icon.80" />
                                    </Icon>
                                    <Action xsi:type="ShowTaskpane">
                                        <SourceLocation resid="gv.url.existing_case" />
                                    </Action>
                                </Control>
                            </Group>
                        </OfficeTab>
                    </ExtensionPoint>
                </DesktopFormFactor>
            </Host>
        </Hosts>

        <Resources>
            <bt:Images>
                <bt:Image id="gv.icon.16" DefaultValue="https://localhost:10084/officeAddIn/icon16.png" />
                <bt:Image id="gv.icon.32" DefaultValue="https://localhost:10084/officeAddIn/icon32.png" />
                <bt:Image id="gv.icon.80" DefaultValue="https://localhost:10084/officeAddIn/icon80.png" />
            </bt:Images>
            <bt:Urls>
                <bt:Url id="gv.url.home" DefaultValue="https://localhost:10084/officeAddIn/app/home.html?gvhost=outlook" />
                <bt:Url id="gv.url.new_case" DefaultValue="https://localhost:10084/officeAddIn/app/new_case.html?gvhost=outlook" />
                <bt:Url id="gv.url.existing_case" DefaultValue="https://localhost:10084/officeAddIn/app/existing_case.html?gvhost=outlook" />
            </bt:Urls>
            <bt:ShortStrings>
                <bt:String id="gv.label.store" DefaultValue="Opslaan in" />
                <bt:String id="gv.label.home" DefaultValue="Home" />
                <bt:String id="gv.label.newcase" DefaultValue="Nieuw" />
                <bt:String id="gv.label.existingcase" DefaultValue="Bestaand" />
            </bt:ShortStrings>
            <bt:LongStrings>
                <bt:String id="gv.descr.newcase" DefaultValue="Nieuw" />
                <bt:String id="gv.descr.existingcase" DefaultValue="Bestaand" />
                <bt:String id="gv.descr.home" DefaultValue="Deze knop is uitsluitend bedoeld voor test doeleinden." />
            </bt:LongStrings>
        </Resources>
    </VersionOverrides>
</OfficeApp>

【问题讨论】:

标签: outlook ms-office add-in office-js


【解决方案1】:

您的清单缺少 IconURL 元素,并且似乎在 SourceLocation 元素中有一个或多个 URL 无法解析。尝试使用Office App Compatibility Kit 验证它。

我猜这是&lt;Resources&gt;&lt;bt:Urls&gt; 中的网址之一;您确定 new_case.thml 和 existing_case.html 是有效文件吗?

我能看到的唯一其他可能有问题的是这个元素:&lt;Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit"/&gt;

您的加载项仅在读取模式下激活,因此不需要规则。无法打开加载项也很奇怪;您是说“管理加载项”页面的“已启用”列中没有您的加载项的复选框?

【讨论】:

  • 另请注意,OWA/Outlook Online 不支持加载项命令(又名功能区按钮)。
  • 我添加了 IconUrl 但这并没有起到什么作用(实际上,除了在我的加载项列表中显示正确的图标)。我猜这些 URL 无法解析,因为它们指向 localhost:10084。我有一个网络服务器在该地址监听。但是,我开始怀疑 OWA 不支持阅读窗格中的任务面板?我确实设法在我的阅读窗格中获得了一个内嵌按钮,单击该按钮时,会打开一个带有我的加载项的内嵌 iframe。它可以工作,但遗憾的是它与桌面版本的功能不同
  • 正确 - OWA 仅支持内联类型的框架,而不支持垂直任务窗格(奇怪的是,撰写电子邮件支持,而内联的不支持)。平价承诺“在未来”
【解决方案2】:

不确定从什么时候开始,但 OWA 现在支持任务窗格加载项。用于打开通常显示在功能区(在 Outlook 桌面)中的任务窗格加载项的按钮现在显示在电子邮件查看窗格的右上方,在“喜欢”和“回复(全部)”按钮旁边。

【讨论】:

    猜你喜欢
    • 2023-03-27
    • 2021-09-11
    • 2016-11-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多