Refresh addin cache outcmd.dat

  • Thread starter Thread starter igoychev
  • Start date Start date
I

igoychev

Hi,

I have an outlook add-in which shows several buttons.

I read that for outlook extentions there is a secret reg key which
makes outlook to refresh its extend.dat file.

Is there such key or similar method for refreshing outcmd.dat?

I need it because when unregistered my addin still shows in outlook.

Thanks,
Ivan
 
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
linger if the add-in doesn't start or user later removes it. You can also
put code in the OnDisconnection event handler to tear down your custom
toolbars and buttons if the user disables your add-in while Outlook is
running. The Items Command Bar sample from http://www.microeye.com
demonstrates this.

In the meantime, the user can rename the Outcmd.dat to do a complete reset
of all toolbar customizations or, better, can use the View | Toolbars |
Customize command to perform a less drastic cleanup.
 
Microeye's example is with Temporary = False and it has the same
behavior as described in my previous posting.

If I set temporary = true then the command bar is created and shown
only in the first Outlook explorer. Every next outlook which I start
does not have toolbar.
 
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.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



igoychev said:
Microeye's example is with Temporary = False and it has the same
behavior as described in my previous posting.

If I set temporary = true then the command bar is created and shown
only in the first Outlook explorer. Every next outlook which I start
does not have toolbar.


"Sue Mosher [MVP-Outlook]" <[email protected]> wrote in message
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
linger if the add-in doesn't start or user later removes it. You can also
put code in the OnDisconnection event handler to tear down your custom
toolbars and buttons if the user disables your add-in while Outlook is
running. The Items Command Bar sample from http://www.microeye.com
demonstrates this.

In the meantime, the user can rename the Outcmd.dat to do a complete reset
of all toolbar customizations or, better, can use the View | Toolbars |
Customize command to perform a less drastic cleanup.
 
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.




Sue Mosher said:
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.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



igoychev said:
Microeye's example is with Temporary = False and it has the same
behavior as described in my previous posting.

If I set temporary = true then the command bar is created and shown
only in the first Outlook explorer. Every next outlook which I start
does not have toolbar.


"Sue Mosher [MVP-Outlook]" <[email protected]> wrote in message
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
linger if the add-in doesn't start or user later removes it. You can also
put code in the OnDisconnection event handler to tear down your custom
toolbars and buttons if the user disables your add-in while Outlook is
running. The Items Command Bar sample from http://www.microeye.com
demonstrates this.

In the meantime, the user can rename the Outcmd.dat to do a complete reset
of all toolbar customizations or, better, can use the View | Toolbars |
Customize command to perform a less drastic cleanup.


Hi,

I have an outlook add-in which shows several buttons.

I read that for outlook extentions there is a secret reg key which
makes outlook to refresh its extend.dat file.

Is there such key or similar method for refreshing outcmd.dat?

I need it because when unregistered my addin still shows in outlook.

Thanks,
Ivan
 
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.
 
Back
Top