在powerpoint 2010中引入了一种称为“阅读视图”的新视图类型。我正在尝试将其应用于演示文稿,但办公室互操作的PpViewType枚举不包含任何将演示文稿视图修改为“阅读视图”的成员。是否有人可以帮助我是否已在其他地方定义或如何以编程方式更改为阅读视图?
PowerPoint.Application oPPT = new PowerPoint.Application();
//Add New Presentation
PowerPoint.Presentations oPresSet = oPPT.Presentations;
PowerPoint.Presentation oPres = oPresSet.Add(Office.MsoTriState.msoTrue);
//Add Slides to the Presentation
PowerPoint.Slides oSlides = oPres.Slides;
PowerPoint.Slide oSlide = oSlides.Add(1, PowerPoint.PpSlideLayout.ppLayoutTitleOnly);
oSlide.Shapes[1].TextFrame.TextRange.Text ="sample text";
//Changing View Type
oPres.Application.ActiveWindow.ViewType = PowerPoint.PpViewType.ppViewNotesPage;
答案 0 :(得分:0)
您似乎无法直接从对象模型切换到“阅读视图”,但您可以将其近似为Office 2010 +中的只读演示文稿文件:
VBA示例
Dim pres As Presentation
Dim settings As SlideShowSettings
Set pres = ActivePresentation
Set settings = pres.SlideShowSettings
settings.ShowType = ppShowTypeWindow2
settings.Run
pres.Windows(1).Close
pres.Saved = msoTrue