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

VSTO Item events add and remove ...



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 12th 06, 03:01 PM posted to microsoft.public.outlook.program_addins
lg
external usenet poster
 
Posts: 26
Default VSTO Item events add and remove ...

Hi,
I am creating an addin for Outlook using VSTO in C#. What I want to
do is catch the write event on an appointment item. I have created a wrapper
class to store the item object and to implement the events to be handled.
When the NewInspector event on the main addin is called I add an open event
and a write event to the item by using:

((Outlook.ItemEvents_10_Event)hAppointmentItem).Op en += new
Outlook.ItemEvents_10_OpenEventHandler(ThisApplica tion_Open);

((Outlook.ItemEvents_10_Event)hAppointmentItem).Wr ite += new
Outlook.ItemEvents_10_OpenEventHandler(ThisApplica tion_Write);

What I want to do is when the item is closed and saved, I want to keep the
write event with the item so if a user drags the appointment item on the
calander to a different date without opening the item, the write event will
trigger. The problem is when the saved item is opened again, another write
event is attached to the item object. I have tried using:

((Outlook.ItemEvents_10_Event)hAppointmentItem).Wr ite -= new
Outlook.ItemEvents_10_OpenEventHandler(ThisApplica tion_Write);

before re-adding the write event again but it dosnt work and dosnt throw an
exception either (as would be expected if the write event object had nothing
assigned to it). Does anyone have any idea's on this ?
Ads
 




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
Item open events and double click events in exchange client extension. Fanxa Add-ins for Outlook 1 August 9th 06 08:18 AM
Outlook 2003 shared add-in (NOT VSTO!) deployment problems build with VS2005 Ken Slovak - [MVP - Outlook] Add-ins for Outlook 1 August 2nd 06 03:29 PM
Question: Using VSTO to package/deploy Outlook Add-Ins? Tadwick Add-ins for Outlook 6 July 31st 06 10:58 PM
Outlook VSTO Appointment Item Delete Event lg Add-ins for Outlook 0 July 31st 06 10:35 AM
Any advantages of VSTO instead of VB6 for Outlook add-in? mattiasw Add-ins for Outlook 4 February 24th 06 07:00 AM


All times are GMT +1. The time now is 12:45 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.