Outlook Addin BeforeAttachmentAddEventHandler中缺少附件类型

问题描述 投票:0回答:1

我有一个处理附件的Outlook加载项。我已经安装了一个处理程序以在添加附件之前捕获附件,以便有机会处理它们。

以下代码可以正常工作,但是已经停止,因为已拖入电子邮件的附件类型表单文件为0。

void handleBeforeAttachmentAdd(Outlook.Attachment attachment, ref bool cancel)
        {


            try { 

                Outlook.OlAttachmentType type = attachment.Type;

                TDAddIn.log(String.Format("handleBeforeAttachmentAdd type : {0}",   type));
                if ((attachment.Type == Outlook.OlAttachmentType.olByValue)  && TDAddIn.canAddAttachment(true))
                {
                    // Do something
                }
            }

            catch (System.Exception exception)
            {
               // handl exception
            }

            return;

        }

有人知道这里发生了什么,我该如何处理?

Barry

c# outlook-addin
1个回答
0
投票

正如Dmitry所发现的,这似乎是一个Outlook错误。

© www.soinside.com 2019 - 2024. All rights reserved.