View Single Post
 
Old 05-08-2014, 10:47 PM
macropod's Avatar
macropod macropod is online now Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,356
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

This works for me:
Code:
Sub KillMyAddin(sAddInFileName As String)
Dim strFile As String, oAddIn As AddIn
For Each oAddIn In Application.AddIns
  With oAddIn
    If .Name = sAddInFileName Then
      strFile = .Path & "\" & sAddInFileName
      .Installed = False
      .Delete
      End If
      Kill strFile
  End With
Next
End Sub
One thing to note though is that, if the Addin is also the attached template, you'd have to detach it (e.g. ActiveDocument.AttachedTemplate = "") before you could delete it.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote