Code: Select all
Public Function lngAddinsCount(strAddins() As String) As Long
' Build an array of current AddIns; return the count
ReDim strAddins(0)
Dim lngHits As Long
Dim ad As AddIn
Dim lng As Long
For lng = 1 To AddIns.Count
Set ad = AddIns(lng)
Call LogFile(strcApplication, "lngAddinsCount - Addin " & ad.Name & vbTab & ad.Installed)
If ad.Installed Then
strAddins(UBound(strAddins)) = ad.Name
ReDim Preserve strAddins(UBound(strAddins) + 1)
lngHits = lngHits + 1
Else
End If
Next lng
If UBound(strAddins) > 0 Then
ReDim Preserve strAddins(UBound(strAddins) - 1)
Else
End If
lngAddinsCount = lngHits
End Function
I have reason to believe my code is trying to look at the MMX015 addin The Locals window shows me that the object ad exists, and is NOT installed. I'm having trouble understanding why (design!) Word won't let me at least see the name of something that it can show to the end-user.
I can test for .Installed before trying to use the .Name, but then I won't be seeing the .Name anyway.
I could examine all files in the various template folders (StartUp, User, WorkGroup etc.) and list all the files there, but to my mind that's not the same as me, the programmer, trying to help you, the end-user, understand why your addins aren't working.
to name a few ...