You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Outlook Windows客户端OnNewMessageCompose等事件无法触发求助

Outlook桌面客户端自动启动事件失效问题排查请求

问题概述

  • 我们的Outlook插件已注册OnNewMessageCompose和OnMessageRecipientsChanged事件,在浏览器版(outlook.office.com)正常运行,但在**Windows客户端Outlook 365(版本2209 内部版本16.0.15629.20068 32位)**中完全失效
  • 此前功能正常,近期在Current Channel (Preview)频道失效;切换至非预览频道曾暂时解决,但目前两个频道均无法运行
  • 特殊症状:开启调试时事件可触发,关闭调试则失效,且撰写窗口顶部提示:We're sorry, we couldn't access <app-name>. Make sure you have a network connection. If the problem continues, please try again later. Dismiss

相关代码

事件处理函数(简化版)

function EventOnCompose(event) {
    HandleComposeEvent(event, false)
        .then((result) => console.log(result))
        .catch((err) => {
            console.error(err);
        })
        .finally(() => {
            console.info("Event completed");
            event.completed();
        });
}

function EventOnRecipientsChanged(event) {
    HandleRecipientsChangedEvent(event, false)
        .then((result) => console.log(result))
        .catch((err) => {
            console.error(err);
        })
        .finally(() => {
            console.info("Event completed");
            event.completed();
        });
}

事件关联代码(addinfunction.js末尾)

Office.actions.associate("EventOnCompose", EventOnCompose);
Office.actions.associate("EventOnRecipientsChanged", EventOnRecipientsChanged);

应用清单(仅保留LaunchEvents相关部分)

<?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"
    xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp">
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
        <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
            <Hosts>
                <Host xsi:type="MailHost">
                    <Runtimes>
                        <Runtime resid="functionFile">
                            <Override type="javascript" resid="functionFileJs"/>
                        </Runtime>
                    </Runtimes>
                    <DesktopFormFactor>
                        <ExtensionPoint xsi:type="LaunchEvent">
                            <LaunchEvents>
                                <LaunchEvent Type="OnNewMessageCompose" FunctionName="EventOnCompose"/>
                                <LaunchEvent Type="OnMessageRecipientsChanged" FunctionName="EventOnRecipientsChanged"/>
                            </LaunchEvents>
                            <SourceLocation resid="functionFile"/>
                        </ExtensionPoint>
                    </DesktopFormFactor>
                </Host>
            </Hosts>
            <Resources>
                <bt:Urls>
                    <bt:Url id="functionFileJs" DefaultValue="https://---host---/js/addinfunction.js"/>
                    <bt:Url id="functionFile" DefaultValue="https://---host---/function.html"/>
                </bt:Urls>
            </Resources>
            <WebApplicationInfo>
                <Id>--- guid ---</Id>
                <Resource>api://---host---/---guid---</Resource>
                <Scopes>
                    <Scope>profile</Scope>
                </Scopes>
            </WebApplicationInfo>
        </VersionOverrides>
    </VersionOverrides>
</OfficeApp>

已尝试的排查步骤

  • 官方自动启动事件调试方法无效(因事件根本未触发)

请求

需要针对该问题提供可行的解决方案或排查方向

内容的提问来源于stack exchange,提问作者Gertsen

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.19 08:20:26