Pete Hinchley: Disabling a Microsoft Office Add-On via COM

Ever find yourself invoking a Microsoft Office application, such as Word, via COM, and needing to disable an add-on in the process? Probably not, but in case you do, here is a PowerShell snippet showing how:

(($word = New-Object -ComObject word.application).comaddins | where {$_.description -eq "Name of Add-On"}).connect = $false; $word.visible = $true