Justin
Justin

Reputation: 4539

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?

Upvotes: 1

Views: 797

Answers (2)

Santosh
Santosh

Reputation: 12353

SysCmd method can be used to determine system information about Microsoft Access

SysCmd(acSysCmdAccessVer) - will return access version
SysCmd(acSysCmdAccessDir) - will return file path to dlls

Upvotes: 0

Alex K.
Alex K.

Reputation: 175926

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

Upvotes: 4

Related Questions