I have written an Add-In for Excel, Outlook & Word - well, 3 separate, very similar ones.
Now I have a hiccup. A user decided to insert an Excel Worksheet object into a Word document and my Excel Add-In fell over. It tried to change either a command bar or the DisplayAlerts property in Excel (which depends on version) and the inserted object doesn't have/allow the bar/property.
Is there an particular Excel application property I can test to see if the Add-In should load or not? So far I have found a difference in the Application.MenuBars(7).Menus(1).MenuItems(3).Caption and the Application.MenuBars(7).Menus(1).MenuItems(5).Caption. If Excel is loaded as an insert the first changes from "&Close" to "&Close && Return to Document1" and the latter changes from "&Save" to "Upda&te". My concern is that I am relying on a menu option caption and I think that is not the safest and most reliable test.
What have others used?
Ozzie Jef.