Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / July 2007

Tip: Looking for answers? Try searching our database.

How to monitor deleted calendar events?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark Beiley - 27 Jul 2007 20:43 GMT
Hello,

I'm wondering the best way to monitor when an event gets deleted from the
calendar?  There doesn't seem to be a notification for this specific event.
Instead, I've been monitoring the "Deleted Items" folder for any events
being added to this folder.  I track events based on their Entry ID.  This
seems to work, but I've run into a case where the Entry ID changes for a
specific event between the time it is on the calendar, and when it gets
added into the deleted items folder.  This only seems to happen when running
the calendar on an exchange server (and not all exchange servers, just one
so far that I know of).  I really have 2 questions:

Are there any better ways to track if a calendar event gets deleted?

Why/how would the exchange server put an event with a different Entry ID
into the Deleted Items folder when a calendar event gets deleted?

Thanks,
Mark
--
Beiley Software
http://www.beiley.com
lsmiranda@gmail.com - 28 Jul 2007 14:30 GMT
I believe I have read somewhere that EntryID is not guaranteed to stay
the same, if the item is moved to a different folder, and has an even
higher chance of being changed if the item is being moved to a new
Store. Are you using outlook 2003 or 2007? As 2007 now has exposed
more events, specifically related to Deletion of items.

> Hello,
>
[quoted text clipped - 17 lines]
> --
> Beiley Softwarehttp://www.beiley.com
Mark Beiley - 29 Jul 2007 18:24 GMT
Thanks for the reply.  My add-in needs to work on Outlook 2000, 2002, 2003,
and 2007, so I need
a way to find out when a calendar event is deleted for any of these
platforms.

Thanks,
Mark
--
Beiley Software
http://www.beiley.com

>I believe I have read somewhere that EntryID is not guaranteed to stay
> the same, if the item is moved to a different folder, and has an even
[quoted text clipped - 28 lines]
>> Beiley Software
>> http://www.beiley.com
Ken Slovak - [MVP - Outlook] - 29 Jul 2007 23:07 GMT
EntryID will change if an item is moved or deleted when using an Exchange
store provider. It doesn't change in those circumstances with a PST store
provider. If an item is moved to a different store EntryID always changes.

The best you'd be able to do is monitor the folder's ItemRemove event, which
fires after an item is deleted and doesn't point to the item, plus ItemAdd
on DeletedItems. If an item is hard deleted it won't go to Deleted Items.

If you have to monitor that you can only check which item or items are
missing from a list you maintain of the Items collection when you get
ItemRemove. That event won't fire if more than 16 items are deleted at once
or the last item in the folder is deleted. The only fix for those problems
is usually to use a timer to sweep the folder and see if anything was added
or is missing.

Signature

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

> Thanks for the reply.  My add-in needs to work on Outlook 2000, 2002,
> 2003, and 2007, so I need
[quoted text clipped - 6 lines]
> Beiley Software
> http://www.beiley.com
Mark Beiley - 30 Jul 2007 00:14 GMT
Thanks Ken, that is very helpful.  Do I understand correctly that the
EntryID will 'always' change when using an Exchange store?  How do you
learn this?  Is it documented somewhere, or do you just learn by
trial/error?

I will pursue the idea of monitoring ItemRemove and maintaining my own list
of items.

Thanks,
Mark
--
Beiley Software
http://www.beiley.com

> EntryID will change if an item is moved or deleted when using an Exchange
> store provider. It doesn't change in those circumstances with a PST store
[quoted text clipped - 22 lines]
>> Beiley Software
>> http://www.beiley.com
Ken Slovak - [MVP - Outlook] - 30 Jul 2007 13:57 GMT
I'm not sure if it's documented anywhere and each store provider implements
its own behavior as to changing EntryID or not, my own knowledge of that is
from lots of experience.

Things are better with Outlook 2007, in that version you have a
Folder.BeforeItemMove event that fires before an item is moved or deleted
from a folder. That event passes you Item, MoveTo and Cancel arguments.
Cancel lets you cancel the action by setting it True, Item is the item the
action is being taken on and MoveTo will be null (Nothing) if the item is
being deleted. MoveTo will pass the destination folder if it's a move and
not a delete.

Signature

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

> Thanks Ken, that is very helpful.  Do I understand correctly that the
> EntryID will 'always' change when using an Exchange store?  How do you
[quoted text clipped - 10 lines]
> Beiley Software
> http://www.beiley.com
Mark Beiley - 30 Jul 2007 19:03 GMT
Thanks again Ken.  It is good to hear there are improvements available
in Outlook 2007.  I'm going to have to stick with a solution that will
work for older versions too though...

Thanks,
Mark
--
Beiley Software
http://www.beiley.com

> I'm not sure if it's documented anywhere and each store provider
> implements its own behavior as to changing EntryID or not, my own
[quoted text clipped - 7 lines]
> being deleted. MoveTo will pass the destination folder if it's a move and
> not a delete.
Ken Slovak - [MVP - Outlook] - 30 Jul 2007 21:35 GMT
Yes, most of my addins still have to support Outlook 2000 and up (a few for
2002 and up) so most of the neat new features that Randy added to the
Outlook object model don't do me any good either. It is nice when I get an
Outlook 2007-only addin though :)

Signature

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

> Thanks again Ken.  It is good to hear there are improvements available
> in Outlook 2007.  I'm going to have to stick with a solution that will
[quoted text clipped - 5 lines]
> Beiley Software
> http://www.beiley.com
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.