简体   繁体   English

从Outlook中配置的多个电子邮件ID中获取收件箱邮件项目

[英]Getting Inbox mail item from multiple email ID configured in outlook

I am working on outlook add in ,I am configured three accounts in outlook based upon selection of email ID i want to process the Inbox item for archive. 我正在使用Outlook添加,正在Outlook中根据要处理的收件箱项目选择电子邮件ID配置了三个帐户。 In 2010 my code is working perfect but in outlook 2007 getting problem. 在2010年,我的代码运行完美,但在Outlook 2007中却出现了问题。

Based upon the selection i am getting Inbox item but in 2007 its giving error 根据选择,我收到了收件箱中的物品,但在2007年却给了错误

             Dim mailID As String = selectedmailID
            inBoxItems = ns.Folders(mailID).Folders("Inbox").Items        //error
            inBoxItems = inBoxItems.Restrict("[Unread] = true")

How I resolve this problem ? 我该如何解决这个问题? Devlelopment system contain outlook 2010 but testing system contain otlook 2007 I has changed reference also but its not working. 开发系统包含Outlook 2010,但测试系统包含otlook 2007我也更改了参考,但是它不起作用。

Is there settings from outlook ? Outlook中有设置吗? plz help me 请帮我

What is the exact error message? 确切的错误消息是什么? Why not use ns.GetDefaultFolder(olFiolderInbox)? 为什么不使用ns.GetDefaultFolder(olFiolderInbox)?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM