Can you create a new slide with the title from the previous?

New Daddy
4StarLounger
Posts: 424
Joined: 05 Nov 2012, 20:02

Can you create a new slide with the title from the previous?

Post by New Daddy »

Can you create a new slide with the title from the previous one? When you are continuing on the same topic, you often want the new slide to have the same title as the previous. (When the body text is overflowing, you can easily achieve this by clicking the "resize" button and choosing "continue on a new slide." I want to emulate that option even when the body text is not overflowing.)

User avatar
HansV
Administrator
Posts: 74177
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Can you create a new slide with the title from the previ

Post by HansV »

I'd copy the current slide in the navigation pane and paste it:
- Select the slide in the navigation pane.
- Press Ctrl+C.
- Press Ctrl+V.
Then clear the contents of the text placeholder(s) in the new slide.
Regards,
Hans

New Daddy
4StarLounger
Posts: 424
Joined: 05 Nov 2012, 20:02

Re: Can you create a new slide with the title from the previ

Post by New Daddy »

HansV wrote:I'd copy the current slide in the navigation pane and paste it:
- Select the slide in the navigation pane.
- Press Ctrl+C.
- Press Ctrl+V.
Then clear the contents of the text placeholder(s) in the new slide.
Yes, that's exactly what I've been doing. I take that there is no quicker way of doing it?

User avatar
HansV
Administrator
Posts: 74177
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Can you create a new slide with the title from the previ

Post by HansV »

A slightly faster method of copying a slide: on the Home or Insert tab of the ribbon, click New Slide > Duplicate Selected Slides.

It is probably possible to create a macro to duplicate the slide and to clear the placeholders (except for the title), but I don't know enough about PowerPoint VBA.
Regards,
Hans

User avatar
Rudi
gamma jay
Posts: 25393
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Can you create a new slide with the title from the previ

Post by Rudi »

So close, but so far :sad:

I set up code to duplicate the current slide and clear the placeholders, but just dunno how to exclude the Title placeholder?

Code: Select all

Sub DuplicateOnlyTitle()
    Dim sld As Slide
    Dim shp As Shape
     
    Set sld = Application.ActiveWindow.View.Slide
    sld.Duplicate
    For Each shp In sld.Shapes
        With shp 
            If .Type = msoPlaceholder Then 'And Not sld.Shapes.Title Then
                 .TextFrame.TextRange.Text = ""
            End If
        End With
    Next
End Sub
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
HansV
Administrator
Posts: 74177
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Can you create a new slide with the title from the previ

Post by HansV »

Nice! This should do it, I hope:

Code: Select all

Sub DuplicateOnlyTitle()
    Dim sld As Slide
    Dim shp As Shape
    Set sld = Application.ActiveWindow.View.Slide
    sld.Duplicate
    For Each shp In ActiveWindow.Selection.SlideRange.Shapes
        With shp
            If .Type = msoPlaceholder And Not .Name Like "Title*" Then
                 .TextFrame.TextRange.Text = ""
            End If
        End With
    Next shp
End Sub
Regards,
Hans

User avatar
Rudi
gamma jay
Posts: 25393
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Can you create a new slide with the title from the previ

Post by Rudi »

Yep...TX. That little condition was frustrating me!
VBA in PPT does not make sense!!!

I changed
For Each shp In ActiveWindow.Selection.SlideRange.Shapes
to
For Each shp In sld.Shapes

and the only other issue (IMHO) is that the source slides placeholders are cleared instead of the duplicated slides placeholders.

Other than that...its something to work with if New Daddy sees fit.
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
HansV
Administrator
Posts: 74177
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Can you create a new slide with the title from the previ

Post by HansV »

This version selects the duplicated slide and clears its placeholders:

Code: Select all

Sub DuplicateOnlyTitle()
    Dim sld As Slide
    Dim shp As Shape
    Set sld = Application.ActiveWindow.View.Slide
    Set sld = sld.Duplicate(1)
    sld.Select
    For Each shp In sld.Shapes
        With shp
            If .Type = msoPlaceholder And Not .Name Like "Title*" Then
                 .TextFrame.TextRange.Text = ""
            End If
        End With
    Next shp
End Sub
Regards,
Hans

User avatar
Rudi
gamma jay
Posts: 25393
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Can you create a new slide with the title from the previ

Post by Rudi »

Nice! :thumbup:
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
Timelord
4StarLounger
Posts: 493
Joined: 23 Jul 2010, 18:36
Location: Harrisburg, PA

Re: Can you create a new slide with the title from the previ

Post by Timelord »

I use 2010 and all I have to do is right click the slide (in the Slides layout on the left) and choose duplicate slide. Yes, I still have to delete the text I don't want but that is a 1 second operation...unless I am missing something from this discussion...
Who will you Inspire today?

User avatar
HansV
Administrator
Posts: 74177
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Can you create a new slide with the title from the previ

Post by HansV »

Apparently that isn't quick enough for New Daddy...
Regards,
Hans

New Daddy
4StarLounger
Posts: 424
Joined: 05 Nov 2012, 20:02

Re: Can you create a new slide with the title from the previ

Post by New Daddy »

Timelord wrote:I use 2010 and all I have to do is right click the slide (in the Slides layout on the left) and choose duplicate slide. Yes, I still have to delete the text I don't want but that is a 1 second operation...unless I am missing something from this discussion...
It's not a 1 second operation if you have pictures and drawings.