> This is an artifact of the construction of your add-in. Best practice is to
> create all toolbars and command buttons as temporary, so that they do not
[quoted text clipped - 21 lines]
> > Thanks,
> > Ivan
I'd go with Temporary = True and check each new Explorer as it's created. If
it needs the command bar, add it to that instance.

Signature
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
> Microeye's example is with Temporary = False and it has the same
> behavior as described in my previous posting.
[quoted text clipped - 14 lines]
> > of all toolbar customizations or, better, can use the View | Toolbars |
> > Customize command to perform a less drastic cleanup.
> > > Hi,
> > >
[quoted text clipped - 9 lines]
> > > Thanks,
> > > Ivan
igoychev - 30 Jul 2004 14:34 GMT
Temporary = True is a good solution but it works only for the first
explorer.
For every next one in the new explorer event the commandbars
collection is not available.
It seems like the event is fired before the new explorer is fully
initialized and i can't get the commandbars collection.
> I'd go with Temporary = True and check each new Explorer as it's created. If
> it needs the command bar, add it to that instance.
[quoted text clipped - 38 lines]
> > > > Thanks,
> > > > Ivan
Ken Slovak - [MVP - Outlook] - 30 Jul 2004 14:45 GMT
Move the command bar creation code into the class module used in the
Explorers wrapper collection. Call an InitButton() public procedure in the
class module from the AddExpl sub in the basExpl code module after you have
instantiated the new class and added it to the collection. That works for me
every time in all versions of Outlook that support COM addins. Make sure
every command bar and button you add has a unique Tag property that is never
replicated in any other command bar or button.
I generally use a Tag of "explbar" and concatenate the Key property of that
Explorer to "explbar" to ensure a unique Tag.

Signature
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
> Temporary = True is a good solution but it works only for the first
> explorer.
[quoted text clipped - 3 lines]
> It seems like the event is fired before the new explorer is fully
> initialized and i can't get the commandbars collection.