且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Outlook 2010 - 在RTF邮件中删除并重新添加附件,使所有附件消失!

更新时间:2023-12-05 20:48:52

这是HTML或RTF消息吗?

So is this HTML or RTF message?

这是针对Exchange存储的吗?

Is this against an Exchange store?

有可能打开太多对象并超过RPC通道限制。

Chances are you are opening too many objects and go over the RPC channel limit.

不要使用多点符号(例如mailItem 附件 [ lIndex ]相当于
mailItem Attachments.Item( lIndex)或
mailItem 附件 添加)并在您不在时释放所有COM对象使用Marshal.ReleaseComObject()将它们放在循环中。

Do not use multiple dot notation (such as mailItem.Attachments[lIndex] which is equivalent to mailItem.Attachments.Item(lIndex) or mailItem.Attachments.Add) and release all COM objects as soon as you are done with them in the loop using Marshal.ReleaseComObject().