I've got a global template (.dotm in the user's Word\STARTUP folder) that creates a custom tab in the Word ribbon menu, with buttons for all kinds of document automation macros written in VBA.
As part of my initialization checks, I'd like to determine whether the user has the latest version of the Add-In installed, by comparing a flag file in the registry vs. one on a network resource library. If the user does not have the latest version installed, I want to give them an opportunity to download it to their machine.
I know how to copy the .dotm file from the network and place it in the correct folder on the user machine, but the obvious problem is that the (old version of the) global template is open as long as Word is open, so I can't immediately replace the file. I can download the .dotm file to STARTUP with a slightly different filename, but then there are two copies. Is there a clever workaround for this scenario? Some kind of script that can be set to execute after Word closes, to delete the old file and rename the just-downloaded file? That's getting outside my area of expertise, but any pointers would be appreciated.