使用以下代码,我成功地跳转到幻灯片中的特定幻灯片-查看using code from this question
Microsoft.Office.Interop.PowerPoint.Presentation objPres;
Microsoft.Office.Interop.PowerPoint.SlideShowView objSlideShowView;
objPres = Globals.ThisAddIn.Application.ActivePresentation;
objPres.SlideShowSettings.ShowPresenterView = MsoTriState.msoFalse;
objPres.SlideShowSettings.Run();
objSlideShowView = objPres.SlideShowWindow.View;
int index = Int32.Parse(clickedIssue.ToolTip.ToString());
objSlideShowView.GotoSlide(index);
但我真正想要的是,它跳转到Normal-View中的特定幻灯片。我知道我可以使用Globals.ThisAddIn.Application.ActiveWindow.Application.ActiveWindow.View.Slide
获得当前选择的幻灯片,但是我如何用代码更改它的引用?
发布于 2018-05-16 23:59:17
我强烈建议您使用
int SlideIndex = 3;
try
{
Globals.YourAddin.Application.ActiveWindow.View.GotoSlide(SlideIndex);
}
catch { }
.Select()给我带来了奇怪的问题,PowerPoint降低了它的性能。
发布于 2017-03-24 06:06:05
使用以下代码解决了这个问题:
Microsoft.Office.Interop.PowerPoint.Presentation objPres;
int index = Int32.Parse(clickedIssue.ToolTip.ToString());
objPres = Globals.ThisAddIn.Application.ActivePresentation;
var slides = objPres.Slides;
slides[index].Select();
https://stackoverflow.com/questions/42987643
复制相似问题