Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageRegistry key that you may be able to check: HKCU\Software\Microsoft\Office Registry Component: http://www.vbaccelerator.com/home/V...rol/article.asp --or-- How to Determine Programmatically If Office XP Is Installed http://www.microsoft.com/office/ork...rn/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 -- Chris Hanscom MVP (Visual Basic) http://www.veign.com -- "Tarren" <noemail@thankyou.com> wrote in message news:%23fJlnQvpEHA.1160@tk2msftngp13.phx.gbl... > 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 > >
Post Follow-up to this messageOn Thu, 30 Sep 2004 09:48:20 -0400, "Tarren" <noemail@thankyou.com> wrote: >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 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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.