Appointment Item

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

Appointment Item
Catch AppointmentItem 
Julian Pointer


Guest


Im tring to catch the Appointment Item, I have tried a few ways to catch it

IAppointment := nil;
if (ASender is TInspector) and Assigned((ASender as TInspector).CurrentItem) then
(ASender as TInspector).CurrentItem.QueryInterface(IID__AppointmentItem , IAppointment);

if Assigned(IAppointment) then
try
showmessage('Appt connect1');

finally
IAppointment := nil;
end;

and

FCalendarItems := TItems.Create(nil);
FCalendarItems.ConnectTo(OutlookApp.GetNamespace('MAPI').GetDefaultFolder(olFolderCalendar).Items);
FCalendarItems.OnItemAdd := DoCalendarItemAdd;
FCalendarItems.OnItemChange := DoCalendarItemChange;


But neither work......



I see you emailed an example to another topic, can you email me the example too?

http://www.add-in-express.com/forum/read.php?FID=5&TID=263&MID=1348&phrase_id=36210#message1348
Posted 12 May, 2005 18:13:54 Top
Julian Pointer


Guest


Hi,
I got it working .... the FCalendarItems code works if I put it in the right place....


Posted 12 May, 2005 18:22:40 Top
Julian Pointer


Guest


One thing though when a calendar item is deleted how do I get the details of the deleted item, I have attached to the OnItemRemove and I can see the TItems... can I get details of the delete one?
Posted 12 May, 2005 18:40:10 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Julian,

You can handle the OnItemAdd event of the Deleted Items folder. But I am afraid you can't do anything if the user deletes an item with Shift+Del.

P.S. As far as I remember you have Add-in Express VCL Edition, so can you please post in future in the VCL forum.
http://www.add-in-express.com/forum/read.php?FID=1

Posted 13 May, 2005 06:44:05 Top