public static bool IsInstalled(MSOfficeApplications app) { string keyName = String.Empty; switch (app) { case MSOfficeApplications.Access: keyName = "Access.Application"; break; case MSOfficeApplications.Excel: keyName = "Excel.Application"; break; case MSOfficeApplications.Word: keyName = "Word.Application"; break; case MSOfficeApplications.PowerPoint: keyName = "PowerPoint.Application"; break; case MSOfficeApplications.Outlook: keyName = "Outlook.Application"; break; } RegistryKey key = Registry.ClassesRoot; RegistryKey subKey = key.OpenSubKey(keyName); return(subKey != null); }
public static bool IsInstalled( MSOfficeApplications app ) { string keyName = String.Empty; switch (app) { case MSOfficeApplications.Access: keyName = "Access.Application"; break; case MSOfficeApplications.Excel: keyName = "Excel.Application"; break; case MSOfficeApplications.Word: keyName = "Word.Application"; break; case MSOfficeApplications.PowerPoint: keyName = "PowerPoint.Application"; break; case MSOfficeApplications.Outlook: keyName = "Outlook.Application"; break; } RegistryKey key = Registry.ClassesRoot; RegistryKey subKey = key.OpenSubKey( keyName ); return ( subKey != null ); }
public static Uri OfficeDocToHtml(string fullFileName, MSOfficeApplications officeType) { Uri url = null; switch (officeType) { case MSOfficeApplications.Excel: url = ProcessExcelDocument(fullFileName); break; case MSOfficeApplications.Word: url = ProcessWordDocument(fullFileName); break; case MSOfficeApplications.PowerPoint: url = ProcessPowerPointDocument(fullFileName); break; case MSOfficeApplications.Outlook: //keyName = "Outlook.Application"; break; } return(url); }
public static Uri OfficeDocToHtml( string fullFileName, MSOfficeApplications officeType ) { Uri url = null; switch (officeType) { case MSOfficeApplications.Excel: url = ProcessExcelDocument( fullFileName ); break; case MSOfficeApplications.Word: url = ProcessWordDocument( fullFileName ); break; case MSOfficeApplications.PowerPoint: url = ProcessPowerPointDocument( fullFileName ); break; case MSOfficeApplications.Outlook: //keyName = "Outlook.Application"; break; } return url; }