Karim
Posts: 170
Joined: 2006-01-02
|
Hi,
I try to mark messages as 'read'. i Try setting the property of the _MailItem interface unread property to false but it doesn't work.Please can you make me a simple example.
Thanks
I use Delphi XE2
Karim |
|
Andrei Smolin
Add-in Express team
Posts: 18829
Joined: 2006-05-11
|
Karim,
var
theExplorer:Explorer;
IMail:_MailItem; sel: Selection;
begin
theExplorer := OutlookApp.ActiveExplorer;
if theExplorer <> nil then
begin
try
sel := theExplorer.Selection;
except
end;
if sel <> nil then begin
IMail := sel.Item(1) as _MailItem;
if IMail <> nil then begin
ShowMessage('It works');
IMail.UnRead := not IMail.UnRead;
end;
end;
end;
end;
Andrei Smolin
Add-in Express Team Leader |
|
Karim
Posts: 170
Joined: 2006-01-02
|
It works very well.
Thank you for you help !!! |
|