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

Aborting ItemChange if ItemRemove Event Handler will be called nex



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old April 9th 10, 04:36 PM posted to microsoft.public.outlook.program_addins
pkelley
external usenet poster
 
Posts: 21
Default Aborting ItemChange if ItemRemove Event Handler will be called nex

Outlook 2007 Add-In
2005 VSTO Second Edition

In Outlook 2007, with regard to an existing AppointmentItem, when pressing
the "Send Cancellation" Button you get 2 Events: ItemRemove, and ItemChange.
In my experience, the ItemChange Event will fire first, followed by the
ItemRemove Event.

In my Add-In, I have the handle to the current AppointmentItem in both the
ItemChange and ItemRemove Event Handlers.

From within the ItemChange Event Handler, I want to be able to determine
that I can abort immediately since my ItemRemove Event Handler will be called
next.

In my application's case, there is no sense in executing any of the
ItemChange code if the ItemRemove code is about to be called and executed.

I thought I had stumbled onto the answer when I discovered the property:
Microsoft.Office.Interop.Outlook.OlMeetingStatus (olNonMeeting=0,
olMeeting=1, olMeetingReceived=3, olMeetingCanceled=5,
olMeetingReceivedAndCanceled=7), to be contained within the AppointmentItem
Object itself. But sadly, when my ItemChange Event Handler fired, the
current value of the current AppointmentItem was "olMeeting" - I was
expecting to see "olMeetingCanceled".

When my ItemChange Event Handler fires, I do NOT want to continue executing
my ItemChange code if the ItemRemove code is about to be called.

Can anybody think of a way to solve this problem?
 




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
ItemChange Event to Propagate Contacts C. Collings Outlook and VBA 1 June 25th 09 08:25 AM
dragging an calendar item to deleted folder does not trigger ItemRemove event Jason Add-ins for Outlook 1 March 20th 09 04:10 PM
ItemRemove event not fire when delete recurring appointment Jason Add-ins for Outlook 9 March 13th 09 02:28 PM
ItemRemove event stop firing, ItemAdd & ItemChange still work Jason Add-ins for Outlook 3 March 4th 09 11:24 PM
Event loop when saving Task item in event handler Mustafa Add-ins for Outlook 1 August 8th 08 06:24 PM


All times are GMT +1. The time now is 05:07 AM.


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.