Skip to content
本页内容

幻灯片(Slide)

幻灯片对象

属性列表

属性说明
返回一个代表指定幻灯片中的所有超链接的 Hyperlinks 集合
返回一个 Shapes 集合,该集合代表被放置或插入到指定幻灯片、幻灯片母版或幻灯片组的所有元素
获取当前页的 slideId
获取当前页码
返回一个代表当前页面的标签的 Tags 对象

返回一个代表指定幻灯片中的所有超链接的 Hyperlinks 集合

语法

表达式.ActivePresentation.SlideShowWindow.View.Slide.Hyperlinks

表达式:文档类型应用对象

示例

js
//@file=base.pptx
async function example() {
  await instance.ready()

  const app = instance.Application

  // 返回一个代表指定幻灯片中的所有超链接的 Hyperlinks 集合
  const Hyperlinks = await app.ActivePresentation.SlideShowWindow.View.Slide
    .Hyperlinks
}

Shapes

返回一个 Shapes 集合,该集合代表被放置或插入到指定幻灯片、幻灯片母版或幻灯片组的所有元素

语法

表达式.ActivePresentation.SlideShowWindow.View.Slide.Shapes

表达式:文档类型应用对象

示例

js
//@file=base.pptx
async function example() {
  await instance.ready()

  const app = instance.Application

  // 返回一个 Shapes 集合,该集合代表被放置或插入到指定幻灯片、幻灯片母版或幻灯片组的所有元素
  const Shapes = await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes
}

SlideID

获取当前页的 slideId

语法

表达式.ActivePresentation.SlideShowWindow.View.Slide.SlideID

表达式:文档类型应用对象

返回值

返回 Number 格式的 id 值

示例

js
//@file=base.ppt
async function example() {
  await instance.ready()

  const app = instance.Application

  // 获取当前页的 slideId
  const slideId = await app.ActivePresentation.SlideShowWindow.View.Slide
    .SlideID
  console.log(slideId)
}

SlideIndex

获取当前页码

语法

表达式.ActivePresentation.SlideShowWindow.View.Slide.SlideIndex

表达式:文档类型应用对象

返回值

返回 Number 表示对应的当前页码

示例

js
//@file=base.pptx
async function example() {
  await instance.ready()

  const app = instance.Application

  // 获取当前页码
  const curryPage = await app.ActivePresentation.SlideShowWindow.View.Slide
    .SlideIndex
  console.log(curryPage)
}

Tags

返回一个代表当前页面的标签的 Tags 对象

语法

表达式.ActivePresentation.SlideShowWindow.View.Slide.Tags

表达式:文档类型应用对象

示例

js
//@file=base.pptx
async function example() {
  await instance.ready()

  const app = instance.Application

  // 返回一个代表当前页面的标签的 Tags 对象
  const Tags = await app.ActivePresentation.SlideShowWindow.View.Slide.Tags
}