0
votes

I recently wrote a macro that will not number hidden slides. That is, when the slide is hidden, it will not be counted in the numbering for the entire deck so if slide 3 is hidden, the numbering would go:

Slide 1, Number 1 Slide 2, Number 2 Slide 3, (No Number) Slide 4, Number 3

Is there a way to do this exact same thing for slides all with the title "Agenda"? I would like my slides to be shown in slide show mode but I don't want them to count towards the numbering of the slides.

Basically, is there a way to refer to the slide title text in an if statement?

Thanks!

1

1 Answers

1
votes

This will return true if a title placeholder is found on a given slide which contains the case-insensitive text "agenda":

' ===========================================================================
' Purpose : Determine if a given slide has an Agenda-based title placeholder
' Written By : Jamie Garroch of YOUpresent.co.uk
' Inputs : oSld - the slide object to be examined
' Outputs : Returns true if the word "agenda" is found in a title placeholder
' Example Call : bAgendaSlide = IsSlideAgenda(ActiveWindow.View.Slide)
' Notes : Search is case insensitive
' ===========================================================================
Function IsSlideAgenda(oSld As Slide) As Boolean
  With oSld.Shapes
    If .HasTitle Then
      If Trim(UCase(.Title.TextFrame.TextRange.text)) Like "*AGENDA*" Then IsSlideAgenda = True
    End If
  End With
End Function