我正在尝试在我的 WPF 程序中打开一个 PowerPoint。我希望将它嵌入到我的页面中,并且还希望对演示文稿使用自定义控件(而不是默认用户栏)。
string FileName = "filePath";
Microsoft.Office.Interop.PowerPoint.Application application = new PowerPoint.Application();
application.SlideShowEnd += new Microsoft.Office.Interop.PowerPoint.EApplication_SlideShowEndEventHandler(powerpnt_SlideShowEnd);
Microsoft.Office.Interop.PowerPoint.Presentation presentation = application.Presentations.Open2007(FileName, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoTrue);
Microsoft.Office.Interop.PowerPoint.SlideShowSettings sst = presentation.SlideShowSettings;
sst.ShowType = Microsoft.Office.Interop.PowerPoint.PpSlideShowType.ppShowTypeSpeaker;
sst.Run();
代码正在运行,我可以打开 PPT 演示文稿,但是,它是全屏的,我找不到处理窗口的方法......
任何想法?