Wednesday, November 9, 2011

How to check programmatically whether Word, Excel exists on Windows OS machine.

To check whether Word, Excel is exists (Office installed) on your Microsoft OS Machine or not, we will use "RegistryKey" class to get information.
Here is C# code for the same.


RegistryKey classessRootKey = Registry.ClassesRoot;
RegistryKey wordRegKey = classessRootKey.OpenSubKey("Word.Application");

RegistryKey excelRegKey = classessRootKey.OpenSubKey("Excel.Application");


Hope this will be helpful to you.

No comments:

Post a Comment