Nigel:
>One point - you don't need to save the file. You could use the GetTempDir (I think) API call to identify the windows temp folder. Outlook automation, for some reason, doesn't tell you the path name but it stores it in the windows temporary folder.
OK. That's interesting. Outlook certainly has a number if little "quirks" <s>.
I am using your Outlook mail class and its working very well. FYI, I have subclassed a couple of your methods - maybe you could comment :-
Getfolder() only appears to support a standalone Outlook setup. We use outlook with Exchange server, so, I had to allow for multiple folders and drill down through the collection looking for the folder name set to an additional property called "cMailBoxName". Sound about right - is this OK with you?
FilterMessages() appears to actually miss the code to filter for "SenderName" filtering. Your class has a "cSenderName" property but FilterMessages() does not handle filtering based on this criteria.
GetOldestMessage() has been changed to point to GetLastMessage() (as opposed to GetFirstMessage()) as this was the only way I could get the oldest message.
GetNewestMessage() has been changed to point to GetFirstMessage() to get the latest (newest) message. The class points to GetLastMessage().
I don't know whether there is a way of controling the native order of items within an Outlook collection and therefore possibly my setup runs contra to yours. However, the last two subclasses cure the issue in my setup.
It may be that I have an old version but it is the one I downloaded from your site. Anyhow, I would be interested to hear your comments on my subclasses. Outlook mail is certainly a very important piece of kit in my toolbox and I would like to stay in step as much as possible with your thoughts and hear of its development, as and when.
Thanks for a great class!
-=Gary