Mauleen

Hi,


Any one know how can i get the which version of MS Office on target machine
How can i get it through programatically (.net) on target PC

Any one have any idea

Mauleen



Re: Visual Studio Tools for Office Detect which version of MS Office at target machine

Ji Zhou ¨C MSFT

Hi Mauleen,

I remembered in this article¡¯s corresponding sample source codes, there is a ComponentCheck.cpp file written in C++. After compiled, it can be used in a custom action to check whether the Office 2003 or 2007 is installed. If you want to use .Net to achieve that, I think as an alternative way, you can retrieve keys in this registry location: HKCU\Software\Microsoft\Office. If there is a sub key of 12.0, that is to say the target machine is installed with Office 2007. Same, 11.0 stands for Office 2003.

Thanks

Ji






Re: Visual Studio Tools for Office Detect which version of MS Office at target machine

MikeChenx

Hi,

There is a problem to use the registry to detect Office version. If the computer is installed with multiple versions of Office. We cannot judge which version is used by the user. The better way, I thought, is to use Office automation to detect the active Office version. The code is as below:

Dim objExcel As Object
objExcel = CreateObject("Excel.Application")
objExcel.Workbooks.Add()
objExcel.Visible = True

MsgBox("The active Office version is = " & objExcel.version)