View Single Post
  #5  
Old August 28th 09, 10:13 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Context Menu Question

I use the Reset() method of the CommandBar to clear the user added controls
before I add them again in OnUpdate().

--
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


"John Erickson" wrote in message
news
That's what I'm attempting to do. I'm pretty sure my Unadvise is working
properly. Then I'm using the Delete method (in reverse item# order in case
Delete changes the item numbering as I'm traversing the controls
collection).
Is the Office::CommandBarControl:elete method the proper way to remove
the
buttons I added on the first context display? I'm asking because it
doesn't
seem to actually remove the controls even though it succeeds. What's the
real
meaning of the bool argument in that method? There's a method called
__NewEnum (or something to that effect) should I be using that or some
other
call after the Deletes to rebuild the controls collection? It's just
really
odd that the same code works fine in Outlook 2002 but doesn't in Outlook
2000.

John


Ads