![]() |
Parse .msg file
Hi All,
I have microsoft outlook .msg file in my local harddisk. i need to get the from, to, subject values from that file.. is there any way to parse the .msg file in java or vb programs... Thanks in Advance Regards, Vadivel |
Parse .msg file
Or you can either use Extended MAPI (C++/Delphi, see
http://support.microsoft.com/?kbid=171907) or you can use Redemption (URL below): RDOSession.GetMessageFromMsgFile, MAPIUtils.GetItemFromMsgFile, RDOMail.Import, Safe*Item.Import and MessageItem.Import Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Vadivel" wrote in message ups.com... Hi All, I have microsoft outlook .msg file in my local harddisk. i need to get the from, to, subject values from that file.. is there any way to parse the .msg file in java or vb programs... Thanks in Advance Regards, Vadivel |
Parse .msg file
Hhi Vadivel. Yes, you can. First, set a reference to the Microsoft Office
Outlook Object Model in the References dialog (depending on your programming tool) or use late binding. The code is pretty simple: Dim objApplication As Outlook.Application 'or "As Object" for late binding 'Note: if you are using the Outlook VBA Editor, you don't need to explicitly declare 'an Outlook object variable; use the global Application object instead Dim objMailItem As MailItem Set objApplication = New Outlook.Application Set objApplicatoin = CreateObject("Outlook.Application") 'for late binding Set objMailItem = objApplication.CreateItemFromTemplate("C:\Temp\tes t.msg") Debug.Print objMailItem.Subject Debug.Print objMailItem.To 'etc. -- Eric Legault (Outlook MVP, MCDBA, old school WOSA MCSD, B.A.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "Vadivel" wrote: Hi All, I have microsoft outlook .msg file in my local harddisk. i need to get the from, to, subject values from that file.. is there any way to parse the .msg file in java or vb programs... Thanks in Advance Regards, Vadivel |
Parse .msg file
=?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==?=
wrote in : Hhi Vadivel. Yes, you can. First, set a reference to the Microsoft Office Outlook Object Model in the References dialog (depending on your programming tool) or use late binding. The code is pretty simple: Note that in Java this stuff is much easier if you're using Microsoft J++, but I think that died as of the (now unavailable) DevStudio V6. I could be wrong there. Both this and Dmitry's suggestion assume that you have Outlook installed on the PC in question -- if not, then it's worth knowing that a .msg file is just a standard structured storage file, so you can use IStorage and friends to pull it apart. If you use (say) DocFile viewer it's pretty obvious what's going on for the basics like subject etc. -- dan |
Parse .msg file
Am Wed, 15 Mar 2006 12:54:07 -0800 schrieb Dan Mitchell:
And if anyone doesn´t have the time to do the job on his own, I´ve found a really great alternative: This site www.priasoft.com offers a library for developers that can read msg files. Just spend $25,000.00 (!) and you´re - sorry, it is done. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- =?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==?= wrote in : Hhi Vadivel. Yes, you can. First, set a reference to the Microsoft Office Outlook Object Model in the References dialog (depending on your programming tool) or use late binding. The code is pretty simple: Note that in Java this stuff is much easier if you're using Microsoft J++, but I think that died as of the (now unavailable) DevStudio V6. I could be wrong there. Both this and Dmitry's suggestion assume that you have Outlook installed on the PC in question -- if not, then it's worth knowing that a .msg file is just a standard structured storage file, so you can use IStorage and friends to pull it apart. If you use (say) DocFile viewer it's pretty obvious what's going on for the basics like subject etc. -- dan |
Parse .msg file
Michael Bauer wrote in
: And if anyone doesn´t have the time to do the job on his own, I´ve found a really great alternative: This site www.priasoft.com offers a library for developers that can read msg files. Just spend $25,000.00 (!) and you´re - sorry, it is done. http://www.priasoft.com/exchangemigr...ucts_msg_r.asp for the particular library. Very interesting -- thanks for the pointer, I'm always surprised when I find out that people have done this sort of thing and never posted about it to these groups.. :) -- dan |
All times are GMT +1. The time now is 11:27 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com