获取页码、跳转页

获取总页数

  1. /*
  2. * @return: number
  3. */
  4. let totalPages = await demo.PPTApplication().ActivePresentation.Slides.Count

获取当前页

  1. /*
  2. * @return: number
  3. */
  4. let totalPages = await demo.PPTApplication().ActivePresentation.SlideShowWindow.View.Slide.SlideIndex

跳转到指定页

  1. /*
  2. * @param: number
  3. */
  4. // 跳转到第三页
  5. await demo.PPTApplication().ActivePresentation.SlideShowWindow.View.GotoSlide(3)

当前页改变事件

  1. function eventHandle() {
  2. // do something
  3. }
  4. // 监听
  5. demo.PPTApplication().Sub.SlideSelectionChanged = eventHandle
  6. // 销毁
  7. demo.PPTApplication().Sub.SlideSelectionChanged = null