View Single Post
  #1  
Old September 11th 08, 03:44 PM posted to microsoft.public.outlook.program_addins
Paulem0071
external usenet poster
 
Posts: 22
Default Duplicate CustomTaskPane Windows - Help!

During debugging of my Outlook 2007 CustomTask Pane, sometimes it appears
twice in outlook. How do i prevent this from happenng. Have tried all
varieties of:

//see if already loaded

if (CustomTaskPanes.Count 0)
{
foreach (Microsoft.Office.Tools.CustomTaskPane ctp in
this.CustomTaskPanes)
{
if (ctp.Title == "My Add-In")
{
//use it
myCustomTaskPane = ctp;

//this.CustomTaskPanes.Remove(ctp);
}

}
}
else
{
//make a new one
taskPane = new MyCustomTaskPane();
myCustomTaskPane = this.CustomTaskPanes.Add(taskPane, "My
Add-In");
}

Thank you.
Ads