[AHK]Get office version

来源:互联网 发布:淘宝托管公司收费 编辑:程序博客网 时间:2024/06/05 00:26

This method uses the registry to get the path, from one of the sources that the 'Run' command would use, and then gets the version number from the exe file:


q::vList := "chrome.exe,firefox.exe,iexplore.exe,excel.exe"vOutput := ""Loop, Parse, vList, % ","{RegRead, vPath, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\%A_LoopField%FileGetVersion, vPVersion, % vPathvOutput .= vPVersion "`t" vPath "`r`n"}Clipboard := vOutputMsgBox, % "done"return

Code: [Select all] [Download]GeSHi © Codebox Plus

MsgBox, % ComObjActive("Excel.Application").Version

Application.Version Property (Outlook)
Application.Version Property (Excel)
Application.Version Property (Word)