从outlook 2010读取邮件正文时出错 [英] Error reading mail body from outlook 2010

查看:144
本文介绍了从outlook 2010读取邮件正文时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试阅读我的Outlook 2010收件箱,所有工作都很好,直到我开始阅读我的邮件正文



I am trying to read my Outlook 2010 inbox and all works good until I start reading my mail body

MyOutlookItem = ((Microsoft.Office.Interop.Outlook.MailItem)myInbox.Items[ItemNo]);
...
string body = MyOutlookItem.Body







'MyOutlookItem.Body threw an exception of type 'System.Runtime.InteropServices.COMException'





任何人都可以帮助我



提前致谢



< b>我尝试了什么:



添加所有可能的引用

检查MyOutlookItem是否为NULL



Can any one help me

Thanks in Advance

What I have tried:

All possible references are added
MyOutlookItem is checked for NULL

推荐答案

似乎不是编程问题...



显示这样的错误当特权级别不够时。请参阅:使用C#程序读取Outlook日历约会时出错 - Stack Overflow [ ^ ]





Seems that isn't programming issue...

Such of error is displayed when the level of privileges in not enough. Please see: Error Reading Outlook Calendar Appointment with C# program - Stack Overflow[^]


thenewbee [ ^ ]写道:

但令我困惑的是我尝试从Ms Access访问相同的Outlook文件夹,它成功检索到所有邮件正文,没有错误。

是否使用其他机制访问文件夹?

But what confuses me is that I tried to access the same outlook folder from Ms Access and it successfully retrieved all mail body with no errors.
Is Access using another mechanism to access the folders?





好​​吧,如果这不是特权问题...检查防病毒软件:< a href =https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f0abee9d-6b98-421d-b204-8def4fba5db6/reading-email-body-crashes-from-visual-basic?forum= outlookdev>从Visual Basic中读取邮件正文崩溃 [ ^ ]



最后,我建议更改 BodyFormat [ ^ ]到纯文本,然后才能访问 Body



Well, if this is not privileges issue... Check antivirus software: Reading email body crashes from Visual Basic[^]

Finally, i'd suggest to change BodyFormat[^] to "Plain Text" before you'll access to Body.


这篇关于从outlook 2010读取邮件正文时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆