【问题标题】:Adding Section/Chapter label to slide header将章节/章节标签添加到幻灯片标题
【发布时间】:2020-08-23 08:46:21
【问题描述】:

我想知道 Powerpoint 是否有一个功能,我可以自动为每张显示章节和/或章节的幻灯片添加格式化的标题。我正在展示我的论文,它分为几个部分,例如“方法”或“评估”,如果我能在每张幻灯片的标题中自动显示它,我会很高兴。最好是从我的 powerpoint 部分自动获取。

我想要这种外观,我目前正在为每张幻灯片手动制作。

【问题讨论】:

  • 您需要 PowerPoint 的帮助来自动插入/更新顶部的“1.Introduction”和“4”,还是包括“The Modern ...”行?
  • Stack Overflow 用于编程问题。请将您的查询发送至answers.microsoft.com 或超级用户。

标签: powerpoint naming


【解决方案1】:

这里有一些入门代码,可让您了解每张幻灯片所属部分的名称。 交给您提供代码以将文本添加到每张幻灯片并对其进行定位/格式化。

Sub Test()
    Dim oSl As Slide
        ' Make sure there ARE sections
        If ActivePresentation.SectionProperties.Count > 0 Then
        For Each oSl In ActivePresentation.Slides
            Debug.Print GetSection(oSl)
        Next
    End If
End Sub

Function GetSection(oSl As Slide) As String
' Returns the name of the section that this slide belongs to.

With oSl
    Debug.Print .sectionIndex
    GetSection = ActivePresentation.SectionProperties.Name(.sectionIndex)
End With

【讨论】:

    【解决方案2】:

    PowerPoint 没有这样的内置功能。

    但是,与大多数 Office 产品一样,PowerPoint 确实具有非常强大的 VBA 宏引擎,它肯定能够做到这一点。

    您的宏必须根据您选择用于标记的任何参数来捕获部分名称,然后它可以将该信息放置在后续幻灯片中您喜欢的任何位置。

    因为幻灯片更多的是关于视觉布局而不是程序化自动创建,所以这是你必须自己构建的东西。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-26
      • 1970-01-01
      • 2023-01-30
      • 1970-01-01
      • 2016-08-15
      • 2021-05-13
      • 2014-05-17
      • 1970-01-01
      相关资源
      最近更新 更多