Message DateTime

Add-in Express™ Support Service
That's what is more important than anything else

Message DateTime
Retreive the ReceiveTime of a message 
H Philip




Posts: 17
Joined: 2005-01-14
A quick example will be much appreciated (-:

Posted 14 Jan, 2005 09:21:43 Top
Dmitry Kostochko


Add-in Express team


Posts: 2745
Joined: 2004-04-05
Hi Philip,

uses Outlook2000, Dialogs;

procedure TAddInModule.adxOlExplorerCommandbar1Controls0Click(Sender: TObject);
var
  IDsp: IDispatch;
  MItem: MailItem;
begin
  IDsp := OutlookApp.ActiveExplorer.Selection.Item(1);
  if Assigned(IDsp) then
    try
      IDsp.QueryInterface(IID__MailItem, MItem);
      if Assigned(MItem) then
        ShowMessage(DateTimeToStr(MItem.ReceivedTime));
    finally
      MItem := nil;
      IDsp := nil;
    end;
end;
Posted 14 Jan, 2005 10:06:15 Top