If Outlook is running when you run your CDO code you really should piggyback
on that session. You do so by passing the logon as follows (assuming
oSession is your CDO.Session object):
oSession.Logon "", "", False, False
Cached and online modes are different ways that Outlook can talk to Exchange
server. Cached mode uses an OST file and synchs with the server at
intervals, online mode talks "live" with the server.
If you haven't set any MessageFilter you don't need one, that was a
possibility of why not all items were showing up for you.
CDO is specific to the Outlook version. If you are using Outlook 2003 you
can only use the version of CDO tailored to that version of Outlook. Same
thing for CDO for Outlook 2007.
CDO for earlier versions of Outlook comes on the Office CD. For Outlook 2007
it has to be downloaded from MS. If Outlook is installed on a machine you
never should use the server side version of CDO, only use the client
version. Otherwise you stand a good chance of messing up Outlook.
What makes you think you are having a caching problem, and define what you
mean by having a caching problem. I'm curious since you don't know about
cached or online modes, so what led you to the conclusion that you have that
problem?
For a good general reference for CDO and lots of code samples see
www.cdolive.com.
CDO is being deprecated and has security issues in the client version, it
will fire the security prompts for any restricted property or method, and in
many cases it will just fail without any prompt, just an error. I don't
think I'd recommend any new or extended development using CDO at this point
in time.