How to capture a Outlook Appointment delete event on costom folder?
===

So i am developing an Outlook-AddIn. One Part of it that i Organize Appointments in an specific folder. I want capture if an element gets deleted (in this case moving out of "my" folder counts as deleted).  
i fould the article http://stackoverflow.com/questions/10579240/how-to-capture-a-c-sharp-outlook-addin-appointment-delete-event
and his/her solution helped a lot, but i have a huge problem:
the event only fires in that "session", where my folder was created, not when i get the folder object from outlook.

my code looks like this:



    private Outlook.MAPIFolder _CalendarMAPIFolder = null;
    private Outlook.MAPIFolderEvents_12_Event _CalendarFolder = null;
    private Outlook.Items _CalendarItems = null;
    
    private void ThisAddIn_Startup(object sender, System.EventArgs e)
    {
        Outlook.MAPIFolder calendarFolder =
            this.Application.GetNamespace("mapi").GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar);
                
        // get the Termine24-Folder (if not found, create it)
        try
        {
            _CalendarMAPIFolder = calendarFolder.Folders[Constants.folderName];
        }
        catch
        {
            _CalendarMAPIFolder = calendarFolder.Folders.Add(Constants.folderName);
        }
        _CalendarItems = _CalendarMAPIFolder.Items;
        _CalendarFolder = _CalendarMAPIFolder as Outlook.MAPIFolderEvents_12_Event;
        if (_CalendarFolder == null)
        {
            MessageBox.Show("can not cast MAPIFolder to Folder");
        }
    
        
        _CalendarFolder.BeforeItemMove += new Outlook.MAPIFolderEvents_12_BeforeItemMoveEventHandler(Folder_BeforeItemMove);
        Debug.Print("events registered");
    }
    public void Folder_BeforeItemMove(
            Object Item,
            Outlook.MAPIFolder MoveTo,
            ref bool Cancel)
    {
        Outlook.AppointmentItem aitem = Item as Outlook.AppointmentItem;
        string s = "";
        if (aitem != null) s = aitem.Subject;
        //Cancel = false;
        MessageBox.Show("Test! " + s);
    }

Does anyone have a solution?
thank you ;)
