2
votes

OBJECTIVE: C# .Net VSTO2010 i need to add a panel to appointment/calendar item window in outlook. AppointmentItem window means window which opens when we click an appointment or create new appointment in outlook. I need to display to some details(appoitnmentitem related) in appointmentItem Window (i prefer to use panel). Actually i am displaying some details (addin related details) in separate tab as form in appointment item window, i want to display those details in single window(appointmentitem window) of appointmentItem

Inspector :Represents the window in which an Outlook item is displayed. but in Inspector there is no support for adding panel

I am able to add panel or custom task pane in outlook main window .but i am not able to do in appointmentitem window.

I am using .Net 4 framework ,visual studio 2010. This has to be done in a outlook Addin, addin is target for MS office outlook 2003,2007,2010(atleast it should support 2007and 2010).

adding panel to outlook main window can be done using window handle and window class , then using function in User32.dll. but same technique i am not able to use on appointmentitem window.( i am not able to get handle of appointment item window)

adding custom task pane to outlook main window can be done using some code but i didnt find functionality to do it on appointment item window.

looking for good help or suggestions

1
Have you tried creating a Form Region for Appointment? I'm not quite sure how you want this to look, but creating a form region is easy in 2007 and 2010.GTG
Are u saying about .oft form? i want to display a some details which is available in one tab(addin related tab) into main tab(appointment tab)user1407517
I'm talking about .ops form, yes. You can create a form that will be displayed below the main form. That's called Adjoining form region.GTG
I got solution the problem ..I got the handle of Appointment Item window and added a panel to it...using idea in codeproject.com/Articles/27262/… i have added panel to display details...thanks GTG.. any other better ways to do this?user1407517
Congratulations, sounds like you're done :-). One other way to do this is to use Add-In Express to create form regions, that will give you the option of having your region where you want it (VSTO only supports Adjoining = at the bottom). See add-in-express.com/creating-addins-blog/2012/02/28/…. But that costs some $ in license and you need to rewrite your addin, so if your solution works, stick with it.GTG

1 Answers

0
votes

You Can Add the side panel through the Custom Task panes and New Inspector Event Handler.

Step 1:

   private void ThisAddIn_Startup(object sender, System.EventArgs e)
    {
        inspectors = this.Application.Inspectors;
        inspectors.NewInspector +=
        new Microsoft.Office.Interop.Outlook.InspectorsEvents_NewInspectorEventHandler(NewInspectorHandler);
    }

Step 2:

        public void Inspectors_NewInspector(Microsoft.Office.Interop.Outlook.Inspector Inspector)
    {
        Microsoft.Office.Tools.CustomTaskPane myCustomTaskPane;

        if(Inspector.CurrentItem is  Microsoft.Office.Interop.Outlook.AppointmentItem ) {

            UserControl uc1 = MyUserControl();
            myCustomTaskPane = getAddIn().CustomTaskPanes.Add(uc1, "MyPanel",Inspector);
            myCustomTaskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionRight;
            myCustomTaskPane.DockPositionRestrict = Office.MsoCTPDockPositionRestrict.msoCTPDockPositionRestrictNoChange;
            myCustomTaskPane.Visible = true;

        }

        //Additionally You can add a property change listener to the current Item here
    }

This will show the Custom side panel in Appointment Item