![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |