在OWA中运行我的Outlook加载项

时间:2016-09-02 09:40:22

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

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

我在Manifest中遗漏了什么? (为了完整起见,包括在下面)

<?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>

2 个答案:

答案 0 :(得分:0)

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

我猜它是<Resources><bt:Urls>中的其中一个网址;你确定new_case.thml和existing_case.html是有效的文件吗?

我能看到的唯一可能是错误的是这个元素:<Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit"/>

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

答案 1 :(得分:0)

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

相关问题