如何在Outlook Addin中访问大型附件。
我正在尝试拦截在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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
取而代之的是,您可以尝试绕过较大的附件限制,以避免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"?
使用 mailitem.beforeatTachmentAdddd 事件。在将附件添加到Outlook项目之前,请发射。
Use the MailItem.BeforeAttachmentAdd event instead. It is fired before an attachment is added to an Outlook item.