On 22 Nov, 13:43, santel <santel_hel...@sify.comwrote:
Hi,
How to check whether the MSOffice files like word, excel, powerpoint
are installed in the machine or not? Anyone please help!
There are a few ways. You could try the following:
try
{
Type officeType = Type.GetTypeFromProgID("Excel.Application");
if (officeType == null)
{
Console.WriteLine("Excel is missing");
}
else
{
Console.WriteLine("Excel is present");
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Or you could have a look in the registry for things like:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\ Excel\InstallRoot
and then check in that path for excel.exe.