We are building sort of Communication Management System atop Outlook. One of the important task we wish to achieve is to retrieve all the messages (.msg files??) in the same thread along with their attachments and put them in the same folder inside CMS's repository .
The problem we are facing is how do we know programatically that particular message (or .msg file??) and attachment belongs to the particular thread.
Say for a first message we create a folder in a repository. Then we want all the messages (along with attachments) sent as a reply to the original message to go automatically in the same folder.
I tried to find if their is any header set in .msg file to identify the thread, but did not found anything.
But still curious how the Outlook client can show the messages arranged as communication thread hierarchy. So there must be some way that we can retrieve this information stored somewhere. I just want to know how can I access it.