自动在 Notes 讲义中包含幻灯片标题(PowerPoint 2016)

自动在 Notes 讲义中包含幻灯片标题(PowerPoint 2016)

我想从 PowerPoint 演示文稿创建手册,其中注释部分中的信息是打印输出的一部分。为了能够将幻灯片标题格式化为目录的一部分,我希望幻灯片标题以文本形式显示,而不仅仅是幻灯片图像的一部分。

作为导出选项,我可以选择幻灯片下方有注释 (但幻灯片标题不是文本格式),或者我可以打印仅限轮廓(但不包括幻灯片注释。)

在 Notes Master 中,我看到一个页眉框,并尝试在那里放置幻灯片标题,但似乎没有办法自动为每张幻灯片指定幻灯片标题。也就是说,我无法在页眉框中包含标题的变量。

如果我查看大纲视图,我看不到注释文本。

有没有办法自动创建包含大纲信息和注释文本的讲义?

答案1

这将拾取每张幻灯片的标题文本并将其添加到备注页。根据需要进行修改以更改文本格式/位置。

Sub AddTitlesToNotesPages()

    Dim oSld As Slide
    Dim oShp As Shape
    Dim sTitleText As String

    For Each oSld In ActivePresentation.Slides

        ' get the slide's title text
        sTitleText = GetTitleText(oSld)

        ' add a text shape with the text to notes page
        ' placement is totally arbitrary; edit to suit
        Set oShp = oSld.NotesPage.Shapes.AddTextbox(msoTextOrientationHorizontal, _
                   0, 0, 500, 100)
        With oShp.TextFrame.TextRange
            .Text = sTitleText
            ' modify other stuff as needed
            .Font.Name = "Arial"
            .Font.Color.RGB = RGB(0, 0, 0)  ' black
            ' and so on
        End With
    Next     ' Slide

End Sub

Function GetTitleText(oSld As Slide) As String
' Returns the title text for oSld if any, or "Slide xxx" if not
    Dim oShp As Shape
    Dim sTemp As String
    For Each oShp In oSld.Shapes
        If oShp.Type = msoPlaceholder Then
            If oShp.PlaceholderFormat.Type = ppPlaceholderCenterTitle Or oShp.PlaceholderFormat.Type = ppPlaceholderTitle Then
                sTemp = oShp.TextFrame.TextRange.Text
            End If
        End If
    Next

    ' if we got this far and didn't find a slide title:
    If Len(sTemp) = 0 Then
        ' return the slide index number
        GetTitleText = "Slide " & CStr(oSld.SlideIndex)
    Else
        ' return the title
        GetTitleText = sTemp
    End If

End Function

相关内容