public void Init(IPowerPointHelper powerPointHelper) { SlideFormatParser.LoadAvailableFormats(); _powerPointHelper = powerPointHelper; if (_powerPointHelper.Connect(false)) { SettingsSource = SettingsSourceEnum.PowerPoint; GetActiveSettings(); } else { KillPowerPoint(); SettingsSource = SettingsSourceEnum.Application; GetDefaultSettings(); } }
public static bool IsPowerPointMultipleInstances(IPowerPointHelper powerPointHelper) { if (Process.GetProcesses().Count(p => p.ProcessName.ToUpper().Contains("POWERPNT")) > 1) return true; try { if (!powerPointHelper.Connect(false)) return false; return powerPointHelper.PowerPointObject.Presentations.Count > 1; } catch { return false; } }