A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Duplicate CustomTaskPane Windows - Help!



 
 
Thread Tools Search this Thread Display Modes
  #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
  #2  
Old September 11th 08, 07:22 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Duplicate CustomTaskPane Windows - Help!

This is what, a VSTO addin? Please provide all relevant information.

You should be using the second overload for CustomTaskPanes.Add(), where you
supply the window to the method.

That way each task pane you add is targeted to a specific window and won't
appear in any other window. Otherwise you might get 3 task panes showing if
you have 3 items open at once.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Paulem0071" wrote in message
...
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.


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I import OE6 messages to Windows Mail on Windows Vista? Steve Gardner Outlook Express 1 February 19th 07 01:06 PM
Windows Easy Transfer for Windows Vista/Outlook2007 GoldCoaster Outlook - Installation 1 February 5th 07 04:16 AM
how do I sync my windows mobile device with windows vista? Nplatzer Outlook - Installation 2 February 2nd 07 11:54 PM
Windows desktop Search in Windows Vista smartguy Outlook - Installation 2 December 3rd 06 04:06 AM
Windows Live Mail Desktop Beta & Windows Messenger Djc_74 Outlook Express 6 June 7th 06 09:03 PM


All times are GMT +1. The time now is 09:18 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.