07-24-2023, 10:10 AM
In TestComplete, how can we get Microsoft Office version (not Excel or Word) using JScript without looking into registry? I tried this (using the `Shell.Application` to get the Program files path) but it doesn't work:
var ProgramFiles = aqEnvironment.GetEnvironmentVariable("ProgramFiles", true);
var MSOffFilePath = ProgramFiles +"\\Microsoft Office\\Office14\\";
var Officeversion = aqFileSystem.GetFileInfo(MSOffFilePath).VersionInfo.FileMajorVersion;
Log.Message(Officeversion);
var ProgramFiles = aqEnvironment.GetEnvironmentVariable("ProgramFiles", true);
var MSOffFilePath = ProgramFiles +"\\Microsoft Office\\Office14\\";
var Officeversion = aqFileSystem.GetFileInfo(MSOffFilePath).VersionInfo.FileMajorVersion;
Log.Message(Officeversion);