You can persist the settings anywhere you want, for example in the user
settings for the addin or the registry or a file stored somewhere, that's up
to you.
Handle the Explorer.Close() event and get the visibility in that event
handler.
--
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
"Saeed" <Saeed RemoveThis @discussions.microsoft.com> wrote in message
news:345609B6-9BF2-4D47-82A9-5A3BA3A59F00@microsoft.com...
>I have added few buttons in a new toolbar using VSTO 2005, which I add
>during
> the add-in startup. User can set its visibility using customize>toolbars.
> I
> want to persist the state of toolbar i.e. if Outlook is closed when
> toolbar
> was not visible, the toolbar should not be visible on next startup. For
> doing
> this I am trying to keep the state of toolbar visibility in registry. Is
> there an event of closing the outlook when I can read the state of toolbar
> visibility and save it in registry? Add-in shutdown does not work as the
> explorers are closed by that time.
>
> Is there an standard way of doing this I mean not through registry?