开发者

PowerPoint: How to get the current slide in multi-selected slides?

开发者 https://www.devze.com 2023-01-09 08:48 出处:网络
I selected multi-slides in the current presentation, But I want to get the slide which in the current document view.

I selected multi-slides in the current presentation, But I want to get the slide which in the current document view.

I tried to use the following code for getting the slide,

Globals.ThisAddIn.Application.ActiveWindow.View.Slide
开发者_运维知识库

But it failed, I still got the first slide in the selected slides.

Any suggestion?


Create a event

Application.SlideSelectionChanged += Application_SlideSelectionChanged;
private void Application_SlideSelectionChanged(SlideRange SldRange)
{
    Debug.WriteLine(SldRange[1].SlideNumber);
}

gives u the current slideNumber in document view

0

精彩评论

暂无评论...
验证码 换一张
取 消