By Adam Nagy
Add-Ins that provide extra functionality without which the document might not function properly, add a DocumentInterest object to the document.
These also supposed to have the same ClientId that the Add-In that created the DocumentInterest has.
Here is a VBA sample showing how you could get all the interests from a given document and all its children:
Sub ListInterests(doc As Document) Debug.Print doc.FullDocumentName Dim aas As ApplicationAddIns Set aas = ThisApplication.ApplicationAddIns Dim di As DocumentInterest For Each di In doc.DocumentInterests If di.InterestType = kInterested Then Dim aa As ApplicationAddIn Set aa = aas.ItemById(di.ClientId) Debug.Print " >> Interest: " _ + di.name + " by add-in " + aa.DisplayName End If Next Dim rd As Document For Each rd In doc.ReferencedDocuments Call ListInterests(rd) Next End Sub Sub ListAllInterests() Dim doc As Document Set doc = ThisApplication.ActiveDocument Call ListInterests(doc) End Sub