![]() |
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
|
|||
|
|||
![]()
Is there any good reason to delete all of the Controls in a CommandBar,
before deleting the CommandBar itself? -Mark |
#2
|
|||
|
|||
![]()
I always just delete the command bar, but I also set it as temporary when I
create it. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Mark J. McGinty" wrote in message ... Is there any good reason to delete all of the Controls in a CommandBar, before deleting the CommandBar itself? -Mark |
#3
|
|||
|
|||
![]() "Ken Slovak - [MVP - Outlook]" wrote in message ... I always just delete the command bar, but I also set it as temporary when I create it. Thanks for the reply, Ken. A couple more questions, if I may... The temporary flag prevents the bar/button definition from being persisted? Wouldn't that tend to make removal unnecessary? I take it you don't pay any attention to RemoveMode when the AddIn disconnects? Thanks, Mark -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Mark J. McGinty" wrote in message ... Is there any good reason to delete all of the Controls in a CommandBar, before deleting the CommandBar itself? -Mark |
#4
|
|||
|
|||
![]() "Mark J. McGinty" wrote in message ... "Ken Slovak - [MVP - Outlook]" wrote in message ... I always just delete the command bar, but I also set it as temporary when I create it. Thanks for the reply, Ken. A couple more questions, if I may... The temporary flag prevents the bar/button definition from being persisted? Wouldn't that tend to make removal unnecessary? I take it you don't pay any attention to RemoveMode when the AddIn disconnects? Hmm, trying to remove them when (RemoveMode ext_dm_UserClosed) seems to be a moot point, since that is the only way OnDisconnection fires while a valid Explorer exists. I also noticed that removing CommandBars in Explorer_Close fails with error: "The Explorer has been closed and cannot be used for further operations. Review your code and restart Outlook." I made both the buttons and the bars temporary (and manually deleted the old bar.) The buttons go away when OL exits, but the bar persists, even when the temp parameter to CommamdBars.Add is True. Where do you remove your CommandBars? -Mark Thanks, Mark -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Mark J. McGinty" wrote in message ... Is there any good reason to delete all of the Controls in a CommandBar, before deleting the CommandBar itself? -Mark |
#5
|
|||
|
|||
![]()
Is Outlook truly exiting? I never get persistent toolbars that weren't
supposed to be there. I do use Explorer.Close. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Mark J. McGinty" wrote in message ... "Mark J. McGinty" wrote in message ... "Ken Slovak - [MVP - Outlook]" wrote in message ... I always just delete the command bar, but I also set it as temporary when I create it. Thanks for the reply, Ken. A couple more questions, if I may... The temporary flag prevents the bar/button definition from being persisted? Wouldn't that tend to make removal unnecessary? I take it you don't pay any attention to RemoveMode when the AddIn disconnects? Hmm, trying to remove them when (RemoveMode ext_dm_UserClosed) seems to be a moot point, since that is the only way OnDisconnection fires while a valid Explorer exists. I also noticed that removing CommandBars in Explorer_Close fails with error: "The Explorer has been closed and cannot be used for further operations. Review your code and restart Outlook." I made both the buttons and the bars temporary (and manually deleted the old bar.) The buttons go away when OL exits, but the bar persists, even when the temp parameter to CommamdBars.Add is True. Where do you remove your CommandBars? -Mark Thanks, Mark -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Mark J. McGinty" wrote in message ... Is there any good reason to delete all of the Controls in a CommandBar, before deleting the CommandBar itself? -Mark |
#6
|
|||
|
|||
![]()
It makes removal automatic, but with Outlook I'm a firm believer in belt
plus suspenders. I don't pay attention to removal mode but if Outlook is exiting you won't get an On_Disconnection event unless all of your Outlook objects have already been released. A classic Catch-22 situation that's only now fixed in Outlook 2007. So we monitor for Explorer.Close and Inspector.Close and if there are no additional Explorers or Inspectors then Outlook is closing and you release all your Outlook objects so On_Disconnection can fire. If the user disconnects the addin I call my release code from On_Disconnection and that checks to see if my global Outlook application object has already been released. If so I just exit that procedure gracefully. One exception to the temporary rule is WordMail. Word doesn't honor the temporary setting although it doesn't fire an error if you set it. So for WordMail you must explicitly delete the buttons/toolbars you've added as well as deal with the CustomizationContext so the user doesn't get your buttons/toolbars when Word (not WordMail) is used and so the user doesn't get a prompt to save Normal.dot when they exit if set to prompt for saving changes to Normal.dot. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Mark J. McGinty" wrote in message ... "Ken Slovak - [MVP - Outlook]" wrote in message ... I always just delete the command bar, but I also set it as temporary when I create it. Thanks for the reply, Ken. A couple more questions, if I may... The temporary flag prevents the bar/button definition from being persisted? Wouldn't that tend to make removal unnecessary? I take it you don't pay any attention to RemoveMode when the AddIn disconnects? Thanks, Mark |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
deleting cache | Alain Weiler | Outlook Express | 2 | June 26th 06 01:22 AM |
Newbie question to CommandBars | Claus Schiroky | Outlook and VBA | 1 | May 10th 06 06:01 AM |
Outlook commandbars | Radiohead | Add-ins for Outlook | 1 | January 25th 06 02:35 PM |
how to use the CommandBars Collection | Jim B | Outlook - Using Forms | 0 | January 22nd 06 12:46 AM |
Deleting a Custom From | Chaplain Doug | Outlook - Using Forms | 1 | January 12th 06 04:25 AM |