Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7954391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:24:57+00:00 2026-06-04T03:24:57+00:00

I add an event handler to every AppointmentItem ‘s send event. This event handler

  • 0

I add an event handler to every AppointmentItem‘s send event. This event handler just do some logging thing. I create a meeting through Outlook 2003, and then update the meeting twice. At last I check the log.

this.Application.Inspectors.NewInspector += new Microsoft.Office.Interop.Outlook.InspectorsEvents_NewInspectorEventHandler(_inspectors_NewInspector);

private void _inspectors_NewInspector(Microsoft.Office.Interop.Outlook.Inspector inspector)
{
    if(inspector.CurrentItem is Outlook.AppointmentItem)
    {
        _appointmentEvent = inspector.CurrentItem as Outlook.ItemEvents_10_Event;
        _appointmentEvent.Send += new Microsoft.Office.Interop.Outlook.ItemEvents_10_SendEventHandler(_appointmentEvent_Send);
    }
}

private void _appointmentEvent_Send(ref bool Cancel)
{
    Log.WriteLog("InspectorWrapper: _appointmentEvent_Send Enter");
    Log.WriteLog("InspectorWrapper: _appointmentEvent_Send Exit");
}

I check the log. I found that send event handler will be called many times.

2012-05-16 10:07:21:066: InspectorWrapper: _appointmentEvent_Send Enter
2012-05-16 10:07:21:067: InspectorWrapper: _appointmentEvent_Send Exit
…
2012-05-16 10:07:27:281: InspectorWrapper: _appointmentEvent_Send Enter
2012-05-16 10:07:27:283: InspectorWrapper: _appointmentEvent_Send Exit
2012-05-16 10:07:27:283: InspectorWrapper: _appointmentEvent_Send Enter
2012-05-16 10:07:27:284: InspectorWrapper: _appointmentEvent_Send Exit
…
2012-05-16 10:07:32:607: InspectorWrapper: _appointmentEvent_Send Enter
2012-05-16 10:07:32:608: InspectorWrapper: _appointmentEvent_Send Exit
2012-05-16 10:07:32:609: InspectorWrapper: _appointmentEvent_Send Enter
2012-05-16 10:07:32:609: InspectorWrapper: _appointmentEvent_Send Exit
2012-05-16 10:07:32:610: InspectorWrapper: _appointmentEvent_Send Enter
2012-05-16 10:07:32:610: InspectorWrapper: _appointmentEvent_Send Exit

Why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:24:58+00:00Added an answer on June 4, 2026 at 3:24 am

    You should add logging to the NewInspector event to see how many times you latch onto the AppointmentItem.Send event. My assumption is that NewInspector is your issue. It is best practice to manage a list of active inspectors using a custom InspectorWrapper as a container to avoid multiple event latching.

    For reference, take a look at FindOutlookInspector from this MSDN reference.

    internal static List<OutlookInspector> m_Windows;       
    internal static OutlookInspector FindOutlookInspector(object window)
    {
        foreach (OutlookInspector inspector in m_Windows)
            if (inspector.Window == window)
                return inspector;
        return null;
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I add event handler to a some elements using query: $('div').mouseover(function () {
I am using this code snippet to add KeyDown event handler to any element
I'm attempting to add an event handler for every control on my form. The
I want to add a MouseOver event handler for any tag. Let say just
How do I add an event handler method to, say a TextBox's TextChanged event
I want to add an event handler to a paragraph for when any user
If we add event listener to a button in java like this : btn.setOnClickListener(new
So my problem is that I want to add an event handler to a
I am unable to create Event Handler when i double click on button or
I'm using a key up handler to add and remove event handlers depending on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.