1

我在创建几个 PowerPoint 模板后发现忘记添加您可以在主视图中找到的“标题”占位符。相反,我添加了文本框占位符,效果很好。但事实证明,有些人使用大纲模式,每张幻灯片的标题都显示在那里。如果未选中标题复选框,则在大纲模式下查看每张幻灯片时都没有标题。

所以,我在想是否可以将给定的占位符更改为 Title 占位符?

4

1 回答 1

0

也许使用VBA。在 Visual Basic 中粘贴。选择目标占位符/文本框(任何文本)。然后,运行它。

Sub convertToTitle()
    Dim osld As Slide
    Dim SlideIndex As Long
    Dim oshp As Shape
    Dim oTxR As TextRange
    SlideIndex = ActiveWindow.View.Slide.SlideIndex
    Set osld = ActivePresentation.Slides(SlideIndex)
    Set oshp = ActiveWindow.Selection.ShapeRange(1)
    Set osld = oshp.Parent
    Set oTxR = oshp.TextFrame.TextRange
    With ActivePresentation
        ActivePresentation.Slides(SlideIndex).CustomLayout = ActivePresentation.Designs(1).SlideMaster.CustomLayouts(2)
        'use layout = 2 because it has both Title & Content
        'but you can use any layout as long as it has Title in it
        osld.Shapes.Placeholders.Item(1).TextFrame.TextRange = oTxR.Characters
        oshp.Delete
    End With
End Sub

瞧,它变成了标题占位符。但是您必须为每张幻灯片运行它。

于 2014-10-10T12:20:19.633 回答