【发布时间】:2015-03-26 03:20:37
【问题描述】:
我正在使用 Outlook 属性访问器来发送电子邮件附件。 这是我正在使用的代码:
//check whether attachments are there or not
if (mailItem.Attachments.Count > 0)
{
//loop through all attachments
for (int j = 1; j <= mailItem.Attachments.Count; j++)
{
//check if attachment is email attachment, then only save to local directory
if (mailItem.Attachments[j].PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x7FFE000B") == false)
{
//save email attachment to local directory
mailItem.Attachments[j].SaveAsFile
(attachmentPath + "\\" +
mailItem.Attachments[j].FileName);
}
}
}
大多数电子邮件都可以正常阅读,但对于其中一些,我收到此错误:
属性“ttp://schemas.microsoft.com/mapi/proptag/0x7FFE000B”未知或找不到。
我想知道这个错误的修复方法是什么,如果抛出错误,是否有任何解决方法?
【问题讨论】:
标签: outlook