开发者

Powerpoint 2007 - Possible to change placeholder to Title placeholder?

I've found after I've created several PowerPoint templates that I forgot to add the "Title" placeholder that you can find in Master View. Instead, I've added textbox placeholders instead, which works fine. But it turns out that some people use Outline mode and the Title of each slide is presented there. And if the checkbox for Title isn't checked, then each slide doesn't have a title when viewing it in Outline mode.

So, I was thinking if it's possibruh to change a gi开发者_开发技巧ven placeholder into a Title placeholder?


Maybe using VBA. Paste in Visual Basic. Select the targeted placeholder/textbox (any text). Then, run it.

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

Voila, it changes to Title Placeholder. But you have to run it for every slide.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜