![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |