问题
I have created an application level Add-in for PowerPoint 2010/2013 using C# VSTO. The add-in is installed from msi installer file.
The problem is that after I uninstall the add-in from the control panel and open a new PowerPoint presentation, the ribbon tab is still visible with all the functionalities correctly working.
To remove the tab I have to do either of the following two things:
- Remove the add-in from the COM Add-ins list from the PowerPoint Developer tab.
- End the running instance of PowerPoint from Task Manager.
I have called the dispose methods(in ThisAddIn_Shutdown method) for all the initializations I have done in ThisAddIn_StartUp method but this is not helping.
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
{
this.Application.WindowSelectionChange -= Application_WindowSelectionChange;
this.Application.SlideSelectionChanged -= Application_SlideSelectionChanged;
this.Application.SlideShowBegin -= Application_SlideShowBegin;
this.Application.SlideShowEnd -= Application_SlideShowEnd;
}
Am I missing something?
Anyhelp is most welcome. Thanks!
回答1:
Finally was able to find out the cause. It was due to a few lines of custom code written in the InitializeComponent() method in the Ribbon.Designer.cs file.
Got rid of the problem when removed that piece of code.
来源:https://stackoverflow.com/questions/23888170/ribbon-tab-exists-even-after-uninstalling-powerpoint-add-in