none
Not getting all items in inbox (as reported by Outlook) RRS feed

  • Question

  • I'm trying to so some inbox cleanup programmatically. My $inbox.items.count is reported one number, but Outlook is reporting another, much larger, number.

    Is there some trick to being able to access the remaining messages? My assumption is that Outlook is only going to get those older messages when it has to. Can I force it to get those items?

    Thanks,
    Gene

    Monday, October 26, 2015 2:57 PM

Answers

  • In cached mode, some email is kept remotely and some is local. The ratio of remote:local is controlled in the Outlook profile settings.

    The simplist way is to change that setting to store all your email locally, but keep cached mode on (for performance). That may not work for your use case, but I think its something to consider. After chaning the setting, open outlook and invoke an Update All for your remotely stored email to download.

    Alternatively, using native programming you could call OpenMsgStore and pass in the MDB_ONLINE flag for the ulFlags Parameter.

    Tuesday, October 27, 2015 12:44 AM

All replies

  • Hello Gene,

    The Count property of the Items class returns the number of items in the Inbox folder only (not subfolders). Most probably you are trying to get the number of items in all subfolders too. In that case you need to walk through the tree of folders and count each folder separately.

    Monday, October 26, 2015 3:12 PM
  • In cached mode, some email is kept remotely and some is local. The ratio of remote:local is controlled in the Outlook profile settings.

    The simplist way is to change that setting to store all your email locally, but keep cached mode on (for performance). That may not work for your use case, but I think its something to consider. After chaning the setting, open outlook and invoke an Update All for your remotely stored email to download.

    Alternatively, using native programming you could call OpenMsgStore and pass in the MDB_ONLINE flag for the ulFlags Parameter.

    Tuesday, October 27, 2015 12:44 AM
  • Awesome! I think that's exactly what I'm looking for.

    Thanks Joel_Z!

    Wednesday, October 28, 2015 4:17 PM
  • Awesome! I think that's exactly what I'm looking for.

    Thanks Joel_Z!

    My pleasure, Gene.

    I'm trying to earn my first point. Would you mark my post as the answer?

    Thursday, October 29, 2015 11:23 PM