I have created XLAM addin ribbon for user needs. Now I need to create update process for bug fixing purposes.
Is it possible to change XLAM file on the fly?
Solution
Yes this is very doable. Two methods to demonstrate:
Manual method
Make sure the add-in file which is in production is set to read-only (right click file, properties, check the box).
When you have finished developing, testing, accepting your update, simply replace the file and ensure you set the new copy back to read-only.
Automated method
Make sure there is a build number in the file.
Have a central location in which you store the current build number
Have code in the file which checks its internal build against the external build number
If external is higher, propose update
Have code that renames the current add-in (either in the add-in itself or in another add-in which handles updates), downloads the new copy and then displays a message to the user stating the add-in was updated, please restart Excel
Have code in the add-in which cleans up old copies of the add-in on start-up.