How to display an Outlook message file using Delphi 2010? Is there a way to wrap my Outlook app and open it in Delphi?
TOutlookApplication? It exists in D2007 and Delphi XE. I assume that it exists in D2010.
Alternatively, you can import the Outlook object library through the menu item Component-> Import ....
Use something like the following:
var App : OutlookApplication; NS : _Namespace; Msg : _MailItem; begin App := CreateOleObject('Outlook.Application'); NS := App.GetNamespace('MAPI'); NS.Logon; Msg := NS.OpenSharedItem('c:\temp\test.msg'); ShowMessage(Msg.Subject);
You can also use Redemption and RDOSession .GetMessageFromMsgFile.