I try to install an AddIn. When I use the code below it copies the addin-file to "C:\Documents and Settings\admin\Application Data\Microsoft\AddIns" before it will work. Why do I have to copy it? I want to install it and keep it where I've already placed it. If i use "application.addins.add(filename, FALSE)" it installs an addin from the microsoftfolder instead of the filename I've specified.
Code:
Public Const ADDIN_PATH As String = "L:\07_Afdelinger\Kultur Fiktion\Analyser mv\Skabelon\Tilføjelsesprogram.xlam"
Public Sub Install()
Dim objAddin As AddIn
Set objAddin = Application.AddIns.Add(ADDIN_PATH, True)
If objAddin.Installed = False Then
objAddin.Installed = True
MsgBox "Tilføjelsesprogrammet " & objAddin.FullName & " er blevet installeret.", vbOKOnly + vbInformation
End If
End Sub