When writing documentation for a Microsoft Access application, it's often important to provide information for on the object library references, especially for those apps that depend heavily on 3rd party or custom components. It's easy to obtain a list of references used, but what about attributes like File Version, Description, and Company? We can get these by opening the file properties in Windows Explorer and viewing the Version tab. If there are more than just a few references, this can be time consuming, especially if various attributes need to be copied and pasted elsewhere.
TypeLib comes to the rescue! TypeLib is a system DLL that can read the metadata contained in a DLL. Simply set a reference to %windir%\tlbinf32.dll, then add and run the following code in a module:
Public Sub ListAllReferences()
Dim ref As Reference
Dim tl As TLI.TypeLibInfo
For Each ref In Access.Reference
Set tl = New TLI.TypeLibInfo
tl.ContainingFile = ref.FullPath
Debug.Print ref.Name & "," & tl.HelpString & "," & ref.BuiltIn & "," & ref.FullPath
Next ref
End Sub
Enjoy!