saving Oulook.MailItem objects

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
 
D

Dmitry Streblechenko

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top