private void MonthClosed() { Microsoft.Office.Interop.PowerPoint.Application pptApp = new Microsoft.Office.Interop.PowerPoint.Application(); Microsoft.Office.Core.MsoTriState ofalse = Microsoft.Office.Core.MsoTriState.msoFalse; Microsoft.Office.Core.MsoTriState otrue = Microsoft.Office.Core.MsoTriState.msoTrue; pptApp.Visible = otrue; pptApp.Activate(); Microsoft.Office.Interop.PowerPoint.Presentations ps = pptApp.Presentations; Microsoft.Office.Interop.PowerPoint.Presentation p = ps.Open(@"F:\Mess Managment\Mess Notice\PPTFormatNotice\MonthClosed.pptx", ofalse, ofalse, otrue); System.Diagnostics.Debug.Print(p.Windows.Count.ToString()); }
private void bunifuThinButton23_Click(object sender, EventArgs e) { Microsoft.Office.Interop.PowerPoint.Application pptApp = new Microsoft.Office.Interop.PowerPoint.Application(); Microsoft.Office.Core.MsoTriState ofalse = Microsoft.Office.Core.MsoTriState.msoFalse; Microsoft.Office.Core.MsoTriState otrue = Microsoft.Office.Core.MsoTriState.msoTrue; pptApp.Visible = otrue; pptApp.Activate(); Microsoft.Office.Interop.PowerPoint.Presentations ps = pptApp.Presentations; Microsoft.Office.Interop.PowerPoint.Presentation p = ps.Open(@"F:\Mess Managment\Mess Notice\PPTFormatNotice\PenaltyMeal.pptx", ofalse, ofalse, otrue); System.Diagnostics.Debug.Print(p.Windows.Count.ToString()); }
private void button1_Click(object sender, EventArgs e) { Microsoft.Office.Interop.PowerPoint.Application pptApp = new Microsoft.Office.Interop.PowerPoint.Application(); Microsoft.Office.Core.MsoTriState ofalse = Microsoft.Office.Core.MsoTriState.msoFalse; Microsoft.Office.Core.MsoTriState otrue = Microsoft.Office.Core.MsoTriState.msoTrue; pptApp.Visible = otrue; pptApp.Activate(); Microsoft.Office.Interop.PowerPoint.Presentations ps = pptApp.Presentations; Microsoft.Office.Interop.PowerPoint.Presentation p = ps.Open(@"F:\Mess Managment\PersonalCostV.1.1.00V.pptx", ofalse, ofalse, otrue); System.Diagnostics.Debug.Print(p.Windows.Count.ToString()); MessageBox.Show(pptApp.ActiveWindow.Caption); }
protected override void OnStart(CustomForm Sender) { Microsoft.Office.Interop.PowerPoint.Application pptApp = new Microsoft.Office.Interop.PowerPoint.Application(); Microsoft.Office.Core.MsoTriState ofalse = Microsoft.Office.Core.MsoTriState.msoFalse; Microsoft.Office.Core.MsoTriState otrue = Microsoft.Office.Core.MsoTriState.msoTrue; pptApp.Visible = otrue; pptApp.Activate(); Microsoft.Office.Interop.PowerPoint.Presentations ps = pptApp.Presentations; opApp = new Microsoft.Office.Interop.PowerPoint.Application(); opApp.SlideShowNextSlide += OpApp_SlideShowNextSlide; ppPresentation = ps.Open(@"c:\a.pptx", ofalse, ofalse, otrue); settings = ppPresentation.SlideShowSettings; settings.RangeType = Microsoft.Office.Interop.PowerPoint.PpSlideShowRangeType.ppShowSlideRange; settings.StartingSlide = StartingSlide; settings.Run(); }