I
ian
I have written a shared add-in which is used in Outlook, the add-in
creates a commandbar.
I would like to save the position of the commandbar, and have project
settings to hold the necessary infomation. I want to save this
informaiton when the user closes down outlook, but I do not know the
correct place to call this code from. I have the following code:
private void SaveCommandBarSettings()
{
Properties.Settings.Default["CommandBarTop"] =
myCommandBar.Top;
Properties.Settings.Default["CommandBarLeft"] =
myCommandBar.Left;
Properties.Settings.Default["CommandBarVisible"] =
myCommandBar.Visible;
Properties.Settings.Default["CommandBarPosition"] =
(int)myCommandBar.Position;
Properties.Settings.Default["CommandBarRowIndex"] =
myCommandBar.RowIndex;
Properties.Settings.Default.Save();
}
I have tried calling this from OnBeginShutdown and OnDisconnection but
in both instances the commandbar object is not available. Does anyone
know where I am going wrong?
Thanks,
Ian
creates a commandbar.
I would like to save the position of the commandbar, and have project
settings to hold the necessary infomation. I want to save this
informaiton when the user closes down outlook, but I do not know the
correct place to call this code from. I have the following code:
private void SaveCommandBarSettings()
{
Properties.Settings.Default["CommandBarTop"] =
myCommandBar.Top;
Properties.Settings.Default["CommandBarLeft"] =
myCommandBar.Left;
Properties.Settings.Default["CommandBarVisible"] =
myCommandBar.Visible;
Properties.Settings.Default["CommandBarPosition"] =
(int)myCommandBar.Position;
Properties.Settings.Default["CommandBarRowIndex"] =
myCommandBar.RowIndex;
Properties.Settings.Default.Save();
}
I have tried calling this from OnBeginShutdown and OnDisconnection but
in both instances the commandbar object is not available. Does anyone
know where I am going wrong?
Thanks,
Ian