Thanks. That got me a step further. The template is indeed open.
For testing purposes I commented out the disabling and removal from the global template list. Then I inserted the following code:
Code:
MsgBox Templates.Count
MsgBox Templates.Item(sOldAddInFile).FullName
For Each oTemp In Application.Templates
sMsg = oTemp.FullName & vbNewLine
Next oTemp
MsgBox sMsg
Templates.Count tells me there are 2 templates open. Those would my add in and Normal.dot. The 2nd line properly spits out path & name of my add in file. So it does exist and everything seems fine.
Then, however, when I iterate through the templates collection, the msgbox only lists the Normal.dot as entry and not my add in file. Weird! Any clue why or how that could be?
Yet, even if I solve that issue, unlike the documents collection, the templates collection does not have a close method. So, the question would still be, how can I close the add-in file?
Unfortunately, the add-in is not part of the documents collection. I checked!
Help is much appreciated.