Outlook items events

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

Outlook items events
 
Stan




Posts: 13
Joined: 2011-06-09
hi,

how do I know which item (not what folder) was created, changed, modified.
It seems that the events of the Delphi adxOLFolderItemsEvents project only concern folders.


...
procedure TFolderItems.DoItemAdd(ASender: TObject; const Item: IDispatch);
begin
  ShowMessage('An Item is added to the "' + Folder.Name + '" folder.');
  {  I want to know the relevant item in the folder ;-) }
end;

procedure TFolderItems.DoItemChange(ASender: TObject; const Item: IDispatch);
begin
  ShowMessage('An Item is changed in the "' + Folder.Name + '" folder.');
  {  I want to know the relevant item in the folder }
end;
...


thanks a lot
Posted 24 Jun, 2011 11:03:39 Top
Andrei Smolin


Add-in Express team


Posts: 14115
Joined: 2006-05-11
Hi Stan,

The item created or modified is supplied int the Item parameter (of the IDispatch type).

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Jun, 2011 07:33:26 Top
Stan




Posts: 13
Joined: 2011-06-09
Hi Andrei,


Thank you for your reply.

I need to read the properties of an object that has been destroyed.
I suppose that the event 'DoItemRemove' occurs after the effective deletion.
Or I would log the removal, ie to know which object has been destroyed.
Any ideas?
Posted 28 Jun, 2011 03:29:12 Top
Andrei Smolin


Add-in Express team


Posts: 14115
Joined: 2006-05-11
Hi Stan,

You can create and manage a list of items before an item gets deleted. Also, in Outlook 2007-2010 you can use the Folder.BeforeItemMove Event.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 28 Jun, 2011 07:02:30 Top
Stan




Posts: 13
Joined: 2011-06-09
Andrei Smolin wrote:
You can create and manage a list of items before an item gets deleted. Also, in Outlook 2007-2010 you can use the Folder.BeforeItemMove Event.


Hi Andrei,
how can I use Folder.BeforeItemMove Event ?
Do I have to intercept in InvokeEvent ?
Where can I find an example of its use?

Thanks.
Posted 05 Jul, 2011 05:24:32 Top
Andrei Smolin


Add-in Express team


Posts: 14115
Joined: 2006-05-11
Hi Stan,

You need to add an ADX Items (not Item!) Events class, see the Add New Item dialog. There's no sample demonstrating its use.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 05 Jul, 2011 05:51:05 Top