幻灯片播放状态以及幻灯片动画控制

最低支持版本 v1.1.2

切换到幻灯片播放状态

  1. await demo.PPTApplication().ActivePresentation.SlideShowSettings.run()

退出幻灯片播放, 切换到预览状态

  1. await demo.PPTApplication().ActivePresentation.SlideShowWindow.View.Exit()

幻灯片下一步动画

  1. await demo.PPTApplication().ActivePresentation.SlideShowWindow.View.GotoNextClick()

幻灯片上一步动画

  1. await demo.PPTApplication().ActivePresentation.SlideShowWindow.View.GotoPreClick()

获取当前幻灯片播放状态

  1. /*
  2. * @return: string ('edit' | 'preview' | 'play')
  3. */
  4. let currentState = await demo.PPTApplication().ActivePresentation.SlideShowWindow.View.State

获取当前页幻灯片动画总步数

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

获取当前页幻灯片动画当前步数

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

切换到幻灯片播放状态回调事件

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

退出幻灯片播放, 切换到预览状态回调事件

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

幻灯片下一步动画回调事件

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

幻灯片上一步动画回调事件

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