Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / May 2007

Tip: Looking for answers? Try searching our database.

Converting Mime to Mapi using iConverterSession

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Esther - 28 Mar 2007 02:07 GMT
I am in  a crunch to convert internet mail .eml files to mapi .msg files in
.net, using c#.  I read about iConverterSession in the outlook 2003 api, but
I can't seem to find enough information or any sample code on how to proceed.
Can anyone point me in the right direction in regards to whether I have to
add any reference in my code, etc.  Some sample code would be very helpful.

If this is not the best way to go, what's my alternative?

Thanks.
Signature

edw

Dmitry Streblechenko - 28 Mar 2007 18:18 GMT
IConverterSession is Extended MAPI, which is not supported in C#.
<plug>
Redemption (url below) will do the conversion eaily. In VB:

set Session = CreateObject("Redemption.RDOSession")
set Msg = Session.GetMessageFromMsgFile("c:\newmsgFile.msg", true)
Msg.Import("c:\YourEmlFile.EML", 1024)
Msg.Save

</plug>

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

>I am in  a crunch to convert internet mail .eml files to mapi .msg files in
> .net, using c#.  I read about iConverterSession in the outlook 2003 api,
[quoted text clipped - 8 lines]
>
> Thanks.
Esther - 28 Mar 2007 21:54 GMT
Dimitry, Thanks for your response.  Is Extended MAPI not supported in .net?  
Could it be used with vb.net instead of c#?  We have used redemption in
another project that is similar to this, but they are looking to not use it
here.  Is there another way to approach this?  Thanks.
Signature

edw

> IConverterSession is Extended MAPI, which is not supported in C#.
> <plug>
[quoted text clipped - 24 lines]
> >
> > Thanks.
Dmitry Streblechenko - 28 Mar 2007 22:40 GMT
No, the official MS position is that Extended MAPI is not supported at all
in the .Net environment, be that C# or VB.Net.
You can still of course use a wrapper like MAPI33 or create your own one in
C++/Delphi/etc.

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

> Dimitry, Thanks for your response.  Is Extended MAPI not supported in
> .net?
[quoted text clipped - 34 lines]
>> >
>> > Thanks.
Daniel - 04 Apr 2007 12:44 GMT
Hello,

I'm learning how to use the Redemption dll...
My objective is to convert eml to msg, before to go in pure VB, I'm doing
some basic test in VBA (under excel),
I installed the CDO library, and declared this library in my vba environment
(Redemption Outlook Library)

I'm trying to reuse the code sample to are proposing such as:
Private Sub CB_ConvertEML2MSG_Click()
'1. Reference: Microsoft Outlook 11.0 Object Library
'2. Reference: Redemption Outlook Library

Set Session = CreateObject("Redemption.RDOSession")
EMLname = "EML_Origin_1"
MSGname = EMLname
EMLpath = ThisWorkbook.Path & EMLname & ".eml"
MSGpath = ThisWorkbook.Path & MSGname & ".msg"
Set Msg = Session.GetMessageFromMsgFile(MSGpath, True)
a = Msg.Import(EMLpath, 1024)
Msg.Save

End Sub

UNFORTUNATELY when a try to set the Session, the system prompts and tells me
that this object is only readable !!??

I guess it's a basic issue...however I failed finding the root-cause

Could you please help me?

Thanks a lot in advance,
Daniel.

> No, the official MS position is that Extended MAPI is not supported at all
> in the .Net environment, be that C# or VB.Net.
[quoted text clipped - 44 lines]
> >> >
> >> > Thanks.
Daniel - 04 Apr 2007 14:32 GMT
Hello,

I found the problem,

thanks

> Hello,
>
[quoted text clipped - 78 lines]
> > >> >
> > >> > Thanks.
jaband@mweb.co.za - 27 May 2007 08:38 GMT
Hi Everyone

There are a large number of posts from developers interested in using
Microsoft Outlook's IConverterSession interface. I happen to be one of
those developers. As far I as see there are no type libraries or C++
headers provided. Any chance someone would be kind enough to post the C
++ header for the IConverterSession interface. There is one floating
around on the Internet but it only supports three functions.

Your help is much appreciated

Jamie
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.