Search code examples
ms-accessvbams-access-2007registry

VBA for Reading from the Registry


Is there code that will allow me to read the version of office installed on a machine, and location of the dlls from ms access?

So I have recently been convinced that late binding is the way to go with the automation my app performs. However, automation is the MAIN function of this app and I need to spin off different routines from some of the version specific code (mainly for ppt presentations).

So I am not really trying to sovle my issue with reference checking & IsBroken methods anymore because that won't help. But I still would like to know what verison of office is installed, what version of each of the office apps are installed (Excel 11.0, Outlook 11.0, etc), and the file paths to the dlls.

So I am wondering if I can get this information by reading the registry?


Solution

  • If your late binding surely all you need is the version agnostic *.Application progid?

    Dim oApp As Object
    Set oApp = CreateObject("Excel.Application")
    Debug.Print "ver " & oApp.Version, "build " & oApp.Build
    oApp.Quit