saving Oulook.MailItem objects

  • Thread starter Thread starter Inon Zukerman
  • Start date Start date
I

Inon Zukerman

hello everyone.

My problem is as follows :

my application keeps a hashtable with Outlook.MailItem objects.
I need to save and load this hashtable (with those objects inside) when
starting and terminating the
application.

I can't "serialize" them because Outlook.MailItem objects do not implement
the Iserializable interface.

so how do I go about saving and loading the hastable with the objects ??
(or even just tell me how to access the binary stream that compose each
Outlook.MailItem object)


I'm stuck with this problem for almost 3 days without any lead ... PLEASE
HELP !!!

Thanks alot
Inon
 
You can save the message as an MSG file (MailItem.SaveAs(..., olMsg)) and
then import it using Application.CreateItemFromTemplate().

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top