Re: removing menus when uninstalling an AddIn
- From: David Thielen <thielen@xxxxxxxxxxxxx>
- Date: Wed, 10 Sep 2008 13:28:33 -0600
We tried that in Word but it would get the menus screwed up with the
normal template, and sometimes would go away if a new template was
brought in.
This info must be in the registry somewhere - anyone know where?
thanks - dave
On Tue, 09 Sep 2008 06:28:58 GMT, v-jzho@xxxxxxxxxxxxxxxxxxxx ("Ji
Zhou [MSFT]") wrote:
Hello Dave,
In order to make the custom command bar and controls do not remain in the
Office application after uninstalling the Add-in, we need to create them as
temporary bars or controls. Temporary bars/controls are automatically
deleted when the container application is closed. This behavior is
controlled by CommandBars.Add()/CommandBarControls.Add() functions'
Temporary parameter.
The corresponding document is available here:
http://msdn.microsoft.com/en-us/library/aa141979(office.10).aspx. See the
explanations for the Temporary parameter.
I also write some test codes on my side. It works fine. I uninstall my
Add-in and restart all Office application. My custom command bar and
controls disappear.
Office.CommandBar cb;
Office.CommandBarComboBox edt;
Office.CommandBarButton btn;
Object missing = Type.Missing;
public void OnConnection(object application, Extensibility.ext_ConnectMode
connectMode, object addInInst, ref System.Array custom)
{
applicationObject = application as Word.Application;
cb = applicationObject.CommandBars.Add("test",
Office.MsoBarPosition.msoBarTop,
false, true) as Office.CommandBar;
cb.Visible = true;
cb.Protection = Microsoft.Office.Core.MsoBarProtection.msoBarNoCustomize;
edt = cb.Controls.Add(Office.MsoControlType.msoControlEdit, missing,
missing, missing, true) as Office.CommandBarComboBox;
edt.Caption = "My Editor";
edt.Tag = "My Editor";
btn = cb.Controls.Add(Office.MsoControlType.msoControlButton, missing,
missing, missing, true) as Office.CommandBarButton;
btn.Caption = "My Button";
btn.Tag = "My Button";
}
Please let me know whether the suggestion works for you or not. And if you
have any concerns or questions on this, please feel free to contact me.
Best regards,
Ji Zhou (v-jzho@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
david@at-at-at@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com
Cubicle Wars - http://www.windwardreports.com/film.htm
.
- Follow-Ups:
- Re: removing menus when uninstalling an AddIn
- From: Ken Slovak - [MVP - Outlook]
- Re: removing menus when uninstalling an AddIn
- References:
- removing menus when uninstalling an AddIn
- From: David Thielen
- RE: removing menus when uninstalling an AddIn
- From: "Ji Zhou [MSFT]"
- removing menus when uninstalling an AddIn
- Prev by Date: Re: removing menus when uninstalling an AddIn
- Next by Date: Re: removing menus when uninstalling an AddIn
- Previous by thread: RE: removing menus when uninstalling an AddIn
- Next by thread: Re: removing menus when uninstalling an AddIn
- Index(es):
Relevant Pages
|