Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General / September 2004



Tip: Looking for answers? Try searching our database.

determine ms office version

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tarren - 30 Sep 2004 14:48 GMT
I have to write an auto patcher for all of the client pcs, but some are
running different versions of office.

How can I determine which version of Microsoft Office is installed?  Do I
get it from the registry?

Thanks
Veign - 30 Sep 2004 15:12 GMT
Registry key that you may be able to check:
HKCU\Software\Microsoft\Office

Registry Component:
http://www.vbaccelerator.com/home/VB/Code/Libraries/Registry_and_Ini_Files/Compl
ete_Registry_Control/article.asp


--or--
How to Determine Programmatically If Office XP Is Installed
http://www.microsoft.com/office/ork/xp/journ/prog0001.htm

--or--

Code that may help - run something similar against a known application
installed (Word may be better):

Public Function ExcelVersion() As String

On Error GoTo Hell

'Attempt to create an Excel object
Dim objExcel As Object
Set objExcel = CreateObject("Excel.Application")

'Retrieve the version
ExcelVersion = "MS Excel v" & objExcel.Version

'Destroy the object
Set objExcel = Nothing

Exit Function

Hell:
   ExcelVersion = "(not found)"

End Function

Signature

Chris Hanscom
MVP (Visual Basic)
http://www.veign.com
--

> I have to write an auto patcher for all of the client pcs, but some are
> running different versions of office.
[quoted text clipped - 3 lines]
>
> Thanks
alpine - 30 Sep 2004 15:34 GMT
>I have to write an auto patcher for all of the client pcs, but some are
>running different versions of office.
[quoted text clipped - 3 lines]
>
>Thanks

You can query the following registry key to get the current Word
version which, in most cases, will equate to the current Office
version....

 HKEY_CLASSES_ROOT\Word.Application\CurVer

HTH,
Bryan
____________________________________________________________
New Vision Software                   "When the going gets weird,"
Bryan Stafford                     "the weird turn pro."
alpine_don'tsendspam@mvps.org     Hunter S. Thompson -  
Microsoft MVP-Visual Basic     Fear and Loathing in LasVegas
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.