This is my code:
try
{
// See if it already exists
this.toolbarButton =
(CommandBarButton)commandBars["Standard"].Controls["Yael's AddIn"];
}
catch(System.Exception)
{
// Create it
this.toolbarButton =
(CommandBarButton)commandBars["Standard"].Controls.Add(1,
System.Reflection.Missing.Value, System.Reflection.Missing.Value,
System.Reflection.Missing.Value, true);
this.toolbarButton.Caption = "Yael's AddIn";
this.toolbarButton.Style = MsoButtonStyle.msoButtonCaption;
}
this.toolbarButton.Tag = "Yael's AddIn";
this.toolbarButton.OnAction = "!<MyAddin1.Connect>";
this.toolbarButton.Visible = true;
this.toolbarButton.Click += new
Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(this.OnToolbarButtonClick);
}
Ken Slovak - said:
Don't depend on removing any UI during uninstalling the addin, that's not a
best practice. Your addin should create any UI using the Temporary flag and
setting that flag true. Then as a precaution also delete your UI when the
Inspector or Explorer where it was created closes.
If you register your addin for all users (HKLM) it's an administrative
installation and therefore does not show up in the COM Add-Ins dialog
(except with Outlook 2007). Register the addin for current user (HKCU) if
you want it to show up in the COM Add-Ins dialog.
I found that if I'm doing regasm /u my.dll
and in the outlook 2003:
ToolBor --> restart
then My add-in button is finally disappear!!!e add-in button
(If I don't doing the uninstall, in the next outlook opening - the add-in
button is appear)
1)So, It's OK?
2)How can I doing uninstall add-in by button clicked method? is it
possible?
3)And if I do:
tools--> options-->other-->advanced options--< com Add-ins
why I can't see my add-in dll?