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

Outlook拼写检查时COM加载项读取邮件触发崩溃问题求助

Outlook 加载项访问Body属性触发未捕获的System.AccessViolation异常

环境信息

  • OUTLOOK版本: 2212 内部版本15928.20282
  • 运行环境:64位Windows系统上运行32位Outlook

前置条件

  • 加载项重写了InspectorActivate事件处理程序

重现步骤

  1. 新建邮件项
  2. 输入包含拼写错误的文本
  3. 选中拼写错误的单词,点击下拉列表中的建议替换词

问题现象

在事件处理程序中访问Outlook MailItem的Body属性时,会抛出System.AccessViolation异常,且该异常无法被try-catch块捕获。

触发异常的代码片段

mailItem = Inspector.CurrentItem as Outlook._MailItem;               

if (mailItem != null)
{
    try
    {
        if (mailItem.Body == null)  // 此处抛出System.AccessViolationException
        {
            return false;
        }
        else
        {
            return true;
        }
    }
    catch(Exception e)
    {
       log.Error(e);
    }
 }

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.28 11:42:06