如何在Outlook Addin中访问大型附件。

发布于 2025-01-31 05:51:47 字数 414 浏览 3 评论 0原文

我正在尝试拦截在Outlook插件中添加到消息中的附件。 Outlook/Exchange设置会阻止大型附件,我发现,使用“附加”按钮或拖放文件以附加“ BeforeatTachmentWriteTotemPfile”事件,然后显示消息。这很棒,它允许您在显示消息之前取消附件。

但是,问题是传递给此事件的附件对象在尝试获取filepath或getTempormararyFilepath时会引发com异常。它还具有空显示名称和0个大小。我希望能够访问试图附加

“错误我得到”

I'm trying to intercept an attachment being added to a message in an Outlook plugin. Outlook/Exchange settings blocking large attachments, and I have found that when using the Attach button or dragging and dropping files to attach the "BeforeAttachmentWriteToTempFile" event fires BEFORE the message is displayed. This is great, it allows you to Cancel attach process before the message is display.

However the problem is the Attachment Object passed to this Event throws COM exceptions when trying to get the FilePath or GetTemporaryFilePath. It also has a null DisplayName and 0 Size. I'd like to be able to access the filePath of the item that was attempted to attached

Error I'm getting

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

朮生 2025-02-07 05:51:47

取而代之的是,您可以尝试绕过较大的附件限制,以避免Outlook提示,并仅在访问/修改后才处理大型附件。参见 a>

You can instead try to bypass the large attachment limitation to avoid Outlook prompt, and deal with the large attachment only after it can be accessed/modified. See Bypass/Ignore Exchange Server "Maximum Send Size"?

围归者 2025-02-07 05:51:47

使用 mailitem.beforeatTachmentAdddd 事件。在将附件添加到Outlook项目之前,请发射。

Use the MailItem.BeforeAttachmentAdd event instead. It is fired before an attachment is added to an Outlook item.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文