Listing Object Library Reference Information in MS Access

by demtron on Friday, October 10, 2008 03:17 PM

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!


Powered by BlogEngine.NET 1.5.1.18
Theme by Mads Kristensen · Adapted by Demtron

Bookmark and Share

Calendar

<<  October 2024  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar
Log in

Milwaukee SEO Company

Milwaukee Access Programmer/Developer

Milwaukee Website Designer and Developer



Marketing / SEO

Blog Directory
blogarama - the blog directory
TopOfBlogs
Milwaukee area SEO, SEM, ASP.Net