简体   繁体   中英

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. In 2010 my code is working perfect but in outlook 2007 getting problem.

Based upon the selection i am getting Inbox item but in 2007 its giving error

             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.

Is there settings from outlook ? plz help me

What is the exact error message? Why not use ns.GetDefaultFolder(olFiolderInbox)?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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