A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

ItemRemove event not fire when delete recurring appointment



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 6th 09, 10:06 PM posted to microsoft.public.outlook.program_addins
Jason
external usenet poster
 
Posts: 41
Default ItemRemove event not fire when delete recurring appointment

Symptom:
When deleting an entire appointment series, the ItemRemove event always
fires. - That is correct.

When deleting the 1st item from a recurring appointment series, the
ItemRemove event does fire. - That is correct.

However, when deleting the other items (2nd to the last) from a recurring
appointment series, the ItemRemove event does not fire. Instead, ItemChange
event is fired. It does not matter if the 1st item has been removed or not.

Question:
In ItemChange event handler, how to detect that the event is actually an
ItemRemove, not ItemChange?

In the Outlook.RecurrencePattern.Exception collection, the Deleted property
is true for all objects in it, when doing delete and update. Can't see
difference between delete and update. What are the real flags/identifiers?


  #2  
Old March 9th 09, 04:15 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default ItemRemove event not fire when delete recurring appointment

I can't repro this.

If I change the start time of an item in a recurring series it is in
Exceptions, but it does not show Deleted == true.

I set up a series of appointments, 10 in all, and deleted the first 3. I
then modified another instance for start time. In Exceptions I had 3 marked
as Deleted == true, 1 as Deleted == false, exactly what I would have
expected.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Jason" wrote in message
...
Symptom:
When deleting an entire appointment series, the ItemRemove event always
fires. - That is correct.

When deleting the 1st item from a recurring appointment series, the
ItemRemove event does fire. - That is correct.

However, when deleting the other items (2nd to the last) from a recurring
appointment series, the ItemRemove event does not fire. Instead,
ItemChange event is fired. It does not matter if the 1st item has been
removed or not.

Question:
In ItemChange event handler, how to detect that the event is actually an
ItemRemove, not ItemChange?

In the Outlook.RecurrencePattern.Exception collection, the Deleted
property is true for all objects in it, when doing delete and update.
Can't see difference between delete and update. What are the real
flags/identifiers?



  #3  
Old March 9th 09, 06:02 PM posted to microsoft.public.outlook.program_addins
Jason
external usenet poster
 
Posts: 41
Default ItemRemove event not fire when delete recurring appointment

You are right Ken.

The deleted items remain in the Exception collection and have the deleted
property set to true and the Appointment set to null.

The Exception collection contains both modified and deleted items.

With these knowledge, I am still not able to identify which item is being
modified or deleted, and what operation (modification or deletion) is
performed? And worse yet, does the operation apply on the entire series or
just single occurrence?

The Appointment.EntryId is used for the entire series.
NO properties of the Exception object is useful.


"Ken Slovak - [MVP - Outlook]" wrote in message
...
I can't repro this.

If I change the start time of an item in a recurring series it is in
Exceptions, but it does not show Deleted == true.

I set up a series of appointments, 10 in all, and deleted the first 3. I
then modified another instance for start time. In Exceptions I had 3
marked as Deleted == true, 1 as Deleted == false, exactly what I would
have expected.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Jason" wrote in message
...
Symptom:
When deleting an entire appointment series, the ItemRemove event always
fires. - That is correct.

When deleting the 1st item from a recurring appointment series, the
ItemRemove event does fire. - That is correct.

However, when deleting the other items (2nd to the last) from a recurring
appointment series, the ItemRemove event does not fire. Instead,
ItemChange event is fired. It does not matter if the 1st item has been
removed or not.

Question:
In ItemChange event handler, how to detect that the event is actually an
ItemRemove, not ItemChange?

In the Outlook.RecurrencePattern.Exception collection, the Deleted
property is true for all objects in it, when doing delete and update.
Can't see difference between delete and update. What are the real
flags/identifiers?





  #4  
Old March 9th 09, 07:34 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default ItemRemove event not fire when delete recurring appointment

Exception.AppointmentItem and Exception.OriginalDate give you enough
information so you can see which instance was modified/deleted in the
Exceptions collection.

For example, get the Start of the item passed to you in ItemChange() and
compare that to each Exception.OriginalDate in the Exceptions collection.

Exception.AppointmentItem will give you back the recurring instance,
although it's not valid for deleted instances.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Jason" wrote in message
...
You are right Ken.

The deleted items remain in the Exception collection and have the deleted
property set to true and the Appointment set to null.

The Exception collection contains both modified and deleted items.

With these knowledge, I am still not able to identify which item is being
modified or deleted, and what operation (modification or deletion) is
performed? And worse yet, does the operation apply on the entire series or
just single occurrence?

The Appointment.EntryId is used for the entire series.
NO properties of the Exception object is useful.


  #5  
Old March 10th 09, 12:58 PM posted to microsoft.public.outlook.program_addins
Jason
external usenet poster
 
Posts: 41
Default ItemRemove event not fire when delete recurring appointment

I need to know what is happening right now, not the past history. I need
current item and current action. Look like they are not there. I'd have to
give up on this.

When an item is changed, the original date will be persisted into Exception
object. When another item is modified, there will be another Exception
object with original date. How do we know which is the newest item modified,
or deleted?

Going through Exceptions collection could be time consuming.

"Ken Slovak - [MVP - Outlook]" wrote in message
...
Exception.AppointmentItem and Exception.OriginalDate give you enough
information so you can see which instance was modified/deleted in the
Exceptions collection.

For example, get the Start of the item passed to you in ItemChange() and
compare that to each Exception.OriginalDate in the Exceptions collection.

Exception.AppointmentItem will give you back the recurring instance,
although it's not valid for deleted instances.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Jason" wrote in message
...
You are right Ken.

The deleted items remain in the Exception collection and have the deleted
property set to true and the Appointment set to null.

The Exception collection contains both modified and deleted items.

With these knowledge, I am still not able to identify which item is being
modified or deleted, and what operation (modification or deletion) is
performed? And worse yet, does the operation apply on the entire series
or just single occurrence?

The Appointment.EntryId is used for the entire series.
NO properties of the Exception object is useful.




  #6  
Old March 10th 09, 02:08 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default ItemRemove event not fire when delete recurring appointment

I fail to see a problem. Iterating Exceptions is not a big deal, nor is
getting recurring instances if you know the start date of the instance or
are incrementing your iteration of the recurrences collection. I do that in
code for a number of my applications. When you get the event you have the
item being changed, it's not a big deal to match it to something in
Exceptions.

If an item is deleted you can't get AppointmentItem for it, if not deleted
you can get AppointmentItem and then check for LastModifiedTime if you want
to see when the Exception was modified.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Jason" wrote in message
...
I need to know what is happening right now, not the past history. I need
current item and current action. Look like they are not there. I'd have to
give up on this.

When an item is changed, the original date will be persisted into
Exception object. When another item is modified, there will be another
Exception object with original date. How do we know which is the newest
item modified, or deleted?

Going through Exceptions collection could be time consuming.


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I change a recurring appointment to all day event? BobC Outlook - Calandaring 5 September 29th 09 03:57 AM
ItemRemove event stop firing, ItemAdd & ItemChange still work Jason Add-ins for Outlook 3 March 5th 09 12:24 AM
How do I delete a recurring event? JuliaBrown Outlook - Calandaring 2 August 17th 06 12:58 PM
Outlook VSTO Appointment Item Delete Event lg Add-ins for Outlook 0 July 31st 06 11:35 AM
script event does not fire urs Outlook - General Queries 2 March 1st 06 05:55 PM


All times are GMT +1. The time now is 12:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.