Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Powaepoint: displaying title of next slide

Status
Not open for further replies.

pinup1957

Technical User
Sep 8, 2004
2
US
Hello

I don't know if I ask this in the right forum, excuse-me if I made a mistake.

I have the following problem to solve: I have a powerpoint presentation consisting of a couple of hundred slides, which serves as a pool for creating several different presentations. I would like the title of the next slide to be displayed in the footer of the current one (so that I always know what comes next) whichever the order of the slides is. I guess this needs some VBA code, I'm totally unaware of how to do this.

Maybe someone could be so kind as to help me out?

Thanks in advance
Dirk
 
Dirk,

Code:
Sub Test()
Dim i As Integer

For i = 1 To ActivePresentation.Slides.Count - 1
    With ActivePresentation.Slides(i).HeadersFooters.Footer
        .Text = ActivePresentation.Slides(i + 1).Shapes(1).TextFrame.TextRange.Text
    End With
Next

End Sub

Might get you started. You'd have to run this everytime a slide is added/deleted. But I don't know how you can always be sure that the title is Shapes(1) on a slide or what fool-proof method there is to identify the title on a slide. Perhaps only if you add the title by code or work from a master on which the title is Shapes(1)?

Ilse
 
Try this. It is almost the same, but will not be thrown off by blank slides with added shapes:

Code:
Sub MyPath()

With ActivePresentation
    For i = 1 To .Slides.Count - 1
        If .Slides(i + 1).Layout <> ppLayoutBlank Then
            .Slides(i).HeadersFooters.Footer.Visible = msoTrue
            .Slides(i).HeadersFooters.Footer.Text = _
            .Slides(i + 1).Shapes.Title.TextFrame.TextRange.Text
        End If
    Next i
End With

End Sub
Then just place an Action Setting onto a shape (that runs this macro) and click that shape at the beginning of every show.

Bill Dilworth
 
Thank you very much,I appreciate your help!

Dirk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top