View Single Post
 
Old 05-08-2014, 06:26 PM
chrismad chrismad is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Apr 2014
Posts: 5
chrismad is on a distinguished road
Default Removing add in programatically

Hi,

I need to remove an add in (global template) programatically.

I uncheck and remove the add in from the list as follows:
Code:
Application.AddIns(sAddInFileName).Installed = False
Application.AddIns(sAddInFileName).Delete
However, when trying to delete the actual file in the Startup folder via
Code:
Kill sAddInFilenameAndPath
I run into error # 70 "Permission denied".

Hence, I assume the template file is still open but when trying to use
Code:
Documents(sAddInFilenameOnly).Close
before the kill command, I get error # 4160 "Bad file name". Yet, sAddInFilenameOnly holds the proper string.

Thanks for your help.
Reply With Quote