Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 05-08-2014, 10:47 PM
macropod's Avatar
macropod macropod is offline Removing add in programatically Windows 7 32bit Removing add in programatically Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,359
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing add in programatically Programatically hide slides during presentation ky1488 PowerPoint 4 09-11-2013 08:21 AM
How do I send an email programatically? macroscope Outlook 7 02-01-2013 02:27 PM
Removing add in programatically Programatically Managing Word Document Structure mlbliss Word VBA 3 11-07-2012 07:42 PM
Removing add in programatically Apply font color programatically using VBA Word divakarganta Word VBA 3 08-08-2012 08:05 PM
Programatically open Outlook folder (set focus) using RDO? NicMic Outlook 0 01-10-2008 03:27 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:56 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft