I have created an add-in in PowerPoint 2010. I need to check the current version of the PowerPoint being used by the user and if the current version is less than 14.0, I need to show a message and also that the add-in is unloaded automatically(or the user is not able to install or select the add-in).
Is there an easy way to do this? I am using C#. Thanks.
See COMAddIns.Item and COMAddIn.Connect.
COMAddIn addin = Application.COMAddIns.Item("yourAddinProgId");
addin.Connect = false;
This will cause the Shutdown
event of your Add-In to be raised. But you'll have to do all the cleanup yourself (undo everything you did on startup).