Hi Ken.
I've created an add-in for Outlook 2003 using VS 2005 and VSTO SE. Upon
opening an Inspector of type AppointmentItem (a new or existing/recurring
appointment), a control is added to the standard toolbar, that when clicked
opens an external browser, say IE, with a given URL. Works great, except...
Upon closing the Appointment inspector, and opening another, to create an
additional appointment for example, clicking the added custom control now
opens two browser windows. Close that inspector, open another, click again,
now there's three new browser windows opened, and so on.
I'm trying to have a maximum of one browser window open. Either launch a new
one if none are open, or reuse the same one if one already does. I assumed
that I was not shutting down the add-in properly.
Here is what I use to launch IE:
System.Diagnostics.Process.Start("IExplore.exe", SomeURL);
Here is what I use when the inspector closes:
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
{
// Drop the NewInspector event handler
openInspectors.NewInspector -= new
Microsoft.Office.Interop.Outlook.InspectorsEvents_NewInspectorEventHandler(newInspector_Event);
// Kill the class-level objects in play
openInspectors = null;
Btn_ConfRoomSchdlr = null;
cmdBars = null;
stdBar = null;
}
Thanks for your time.