How to display the title of the next slide in the current one

  • Thread starter Thread starter Dirk Offringa
  • Start date Start date
D

Dirk Offringa

Hi

I need to display the title of the next slide in the
presentation in the footer of the current one,
automatically, so that even when I change the order of the
slides in the presentation, the correct next one is
announced. I'd be very grateful if anyone could help me
out!


Thanks many
Dirk
 
Thanks for your concern! I don't mind using VBA code, but I'm a total
beginner there, and need some help indeed.......
If someone could send me on the right track.......

Thanks!
Dirk
 
OK. Try this. The following code will add a shape to the bottom of each
slide (except the last) that contains the text from the first shape of
the next slide. If the shape already has been added, it will just change
the text. You can either run this code whenever you want (hit Alt-F8 and
pick the macro Footerize to run), or you can put a button on your first
slide that has its action settings set to run the Footerize macro. If
you choose the second option, I would suggest putting
ActivePresentation.SlideShowWindow.View.Next
at the end of the macro (right before the End Sub line) so the button
will automatically take you to the next slide.

Here is the code:

Sub Footerize()
Dim i As Long
Dim shp As Shape
Dim hasFooter As Boolean
Dim newFooterBox As Shape

For i = 1 To ActivePresentation.Slides.Count - 1
hasFooter = False
For Each shp In ActivePresentation.Slides(i).Shapes
If shp.Name = "MyVeryOwnFooter" Then
hasFooter = True
End If
Next
If hasFooter = True Then
ActivePresentation.Slides(i).Shapes("MyVeryOwnFooter") _
.TextFrame.TextRange.Text = _
ActivePresentation.Slides(i + 1).Shapes(1) _
.TextFrame.TextRange.Text
Else
Set newFooterBox = _
ActivePresentation.Slides(i).Shapes.AddShape _
(msoTextOrientationHorizontal, 0#, 504#, 720#, 28.875)
newFooterBox.Name = "MyVeryOwnFooter"
newFooterBox.TextFrame.TextRange.Text = _
ActivePresentation.Slides(i + 1).Shapes(1) _
.TextFrame.TextRange.Text
newFooterBox.TextFrame.TextRange.Font.Size = 10
newFooterBox.TextFrame.TextRange.ParagraphFormat.Alignment _
= ppAlignCenter
End If
Next i
End Sub


--
David M. Marcovitz, Ph.D.
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
Back
Top