Check if Office Application Installed in C#

Here is a quick method to check if an office application is installed on a client machine without relying on registry keys.

public static bool IsAppInstalled(string app)
        if (string.IsNullOrWhiteSpace(app))
            throw new ArgumentException("App cannot be empty string");
        var properCaseApp = char.ToUpper(app[0]) + app.Substring(1);
        return Type.GetTypeFromProgID(string.Format("{0}.Application", properCaseApp)) != null;
Comments are closed