Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Exchange
2000.active.directory
2000.admin
2000.announcements
2000.app.conversion
2000.applications
2000.clients
2000.clustering
2000.connectivity
2000.development
2000.documentation
2000.general
2000.information.store
2000.interop
2000.kms
2000.misc
2000.protocols
2000.realtime.collabo.
2000.setup
2000.transport
2000.win2000
admin
application.conversion
applications
clients
clustering
connectivity
design
development
misc
mobility
setup
tools
  
 
date: Tue, 18 Mar 2008 09:44:03 -0700,    group: microsoft.public.exchange.development        back       


How save message from Exchange 2003 in msg format   
Hi
I'm using Exchange 2003 and cdoex.dll version 6.5.6944.0 (from Exchange 
sever directory)
I execute code like this:
Code Snippet

MessageClass msg = new MessageClass();
msg.DataSource.Open(...);
ADODB.Stream stream = msg.IBordyPart_GetSream();
stream.SaveToFile("C:\myMes.msg",//someoptions);


All right this is work, but file myMes.msg save in .eml format, Can I save 
message to file or get Stream in msg format immediatly ?? Or convert to msg 
programmaticly??

Thanks!
date: Tue, 18 Mar 2008 09:44:03 -0700   author:   Ilya

Re: How save message from Exchange 2003 in msg format   
MSG format is Extended MAPI specific. You can use Extended MAPI (C++/Delphi 
only, see http://support.microsoft.com/kb/171907) to create a blank MSG file 
and import the EML file (use IConverterSEssion if you have Outlook 2002 or 
higher installed or, in case of Exchange, you will need to create your own 
parser).

<plug>
Or you can use Redemption, which does the above and works both with the 
Outlook version of MAPI and the one installed by Exchange:

RDOSession RDOSession1 = new RDOSession();
RDOMail Msg;

Msg = RDOSession1.GetMessageFromMsgFile(@"c:\temp\test.msg", true)

Msg.Import(@"c:\temp\test.eml", rdoSaveAsType.olRFC822);

Msg.Save();


</plug>

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

"Ilya"  wrote in message 
news:5D9363CA-309F-4EAB-9E45-3B228715BB24@microsoft.com...
> Hi
> I'm using Exchange 2003 and cdoex.dll version 6.5.6944.0 (from Exchange
> sever directory)
> I execute code like this:
> Code Snippet
>
> MessageClass msg = new MessageClass();
> msg.DataSource.Open(...);
> ADODB.Stream stream = msg.IBordyPart_GetSream();
> stream.SaveToFile("C:\myMes.msg",//someoptions);
>
>
> All right this is work, but file myMes.msg save in .eml format, Can I save
> message to file or get Stream in msg format immediatly ?? Or convert to 
> msg
> programmaticly??
>
> Thanks!
date: Tue, 18 Mar 2008 12:06:48 -0700   author:   Dmitry Streblechenko

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us