My nickname is Tymer, but this message is posted using my real name, cuz I
am using Outlook Express to send message on this newsgroup.
Okay, you say that you have some type of stream in memory, which Dimitry,
claims is an Outlook Message file.
An Outlook Message file is an Ole2 Structured Storage file.Using the JiSys
dll, you can absolutely read the properties, write new properites, and save
the Message File or document to disk.
As I mentioned I wrote an entire API in C#, using this control. This
control, will accept as input, a stream object from .NET.
You will not need the API I wrote, you will only need the JiSys control and
do your own thing.
Once, we have an Ole2Document object, in memory from your stream, the world
is at your command, you can do anything with the message you need.
However, I have no idea how you actually got the Outlook Message File in a
stream.
It sounds like you might have created the stream from a File Drop using
Drag-n-Drop. I am pretty savy with Messaging, and .NET so don't worry about
comments or incomplete code. If you are using Interop to get at the stream,
I would also need that portion of your code.
Can you post, or send me a copy of the C# source code, which gets the
Message File in a stream?
I will figure out if the stream does in fact have the Entire Outlook Message
file.
If the stream contains what Dimitry claims, we should have no trouble
getting this to work.
This is why your post, was so interesting to me, and maybe, we can both help
each other.
Arild said:
Well, we are currently working on a solution where we are enabling a Drag
'n Drop feature from MS Outlook to a Document Library in Windows SharePoint
Services/SharePoint Portal Server v.2. The MemoryStream is only used to read
the message from the machines memory, and import it into the document
library by using the SPS API. (Or it can be done by the Web Services
included in SPS v.2)
However, we also need some of the properties from the MSG file/stream,
like To, From, ID ++ to enable duplicate checking and import this meta-data
together with the e-mail for later search purposes. These properties are
much easier to retrieve from a MailItem, then reading from a Stream.
However, as you can read from this posting, there are some issues with
importing the Stream into a MailItem.
It sounds like your API can solve many of the issues, but still (if I read
you correct) we need to save the MSG file to disk.
Well, that's the short version of our case.
-Arild
----- Tymer wrote: -----
I am deeply interested in the C# code you posted.
Can you tell me more about what you are doing with an Outlook Message File in a MemoryStream?
FYI
An Outlook Message file is an OLE 2.0 Structured Storage Document,
also known as a Compound Document.
I wrote an an entire API in C# to access all the MAPI properties of
an Outlook Message File (.msg) on disk.
The API uses a 100% native C# component from
http://www.jisys.com/ (Jisys Storage 1.0).
There is also another component, which can also read OLE 2.0
Structured Storage documents at:
http://www.desaware.com/StorageToolsL2.htm
The component is a COM object called StorageTools.
I like the Jisys component best, as it is native C#.
I thought maybe I could enhance my project, by using your idea with
an Outlook Message File in a memory stream.