Slide Titles Macro 2007, 2010

User avatar
teachesms
2StarLounger
Posts: 170
Joined: 05 Feb 2010, 18:04
Location: Jacksonville, NC

Slide Titles Macro 2007, 2010

Post by teachesms »

I have the following code that grabs titles from each slide and places them into a hyperlinked summary slide. It only grabs the first 8 slide titles however. What is keeping it from grabbing all slide titles?

Code: Select all

Sub AgendaLinks()
    Dim oSld As Slide
    Dim oShp As Shape
    Dim oAgenda As TextRange
    Dim x As Integer
    ' Add a slide to the beginning of presentation
    ActivePresentation.Slides.Add 1, ppLayoutText
    With ActivePresentation.Slides(1)
        .Shapes(1).TextFrame.TextRange = "Agenda Slide"
        Set oAgenda = .Shapes(2).TextFrame.TextRange
    End With

    oAgenda = ""

    For Each oSld In ActivePresentation.Slides
        ' Does the slide have title placeholder?
        If oSld.Shapes.HasTitle Then
            ' Get the reference to the title shape on the slide
            Set oShp = oSld.Shapes.Title
            ' Check if the placeholder has  any text in it.
            If oShp.TextFrame.TextRange.Text = "" Then
                oAgenda = oAgenda & "Slide " & oSld.SlideIndex & Chr(13)
            Else
                oAgenda = oAgenda & oShp.TextFrame.TextRange.Text & Chr(13)
            End If
        Else
            oAgenda = oAgenda & "Slide " & oSld.SlideIndex & Chr(13)
        End If

    Next oSld


    ' Add hyperlinks to the titles.
    For x = 1 To oAgenda.Sentences.Count
        Set oSld = ActivePresentation.Slides(x)
        With oAgenda.Sentences(x) _
             .ActionSettings(ppMouseClick).Hyperlink

            .Address = ""
            ' Hyperlink - Slide ID, Slide Index, Slide Title
            .SubAddress = oSld.SlideID & "," & _
                          oSld.SlideIndex & "," & _
                          oAgenda.Sentences(x).Text
        End With
    Next x
    ' Delete the first one because it points to the agenda slide.
    oAgenda.Sentences(1).Delete
End Sub


If you can't convince them, confuse them - Harry S. Truman

Nannette

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

Re: Slide Titles Macro 2007, 2010

Post by Rudi »

Hi Nannette,

Just tested your macro and it runs perfectly in my sample presentation of 20 slides, creating hyperlinks to all the slides (even if it does not have a Title Placeholder).
What happens after the 8th slide in your presentation?
Regards,
Rudi

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

User avatar
teachesms
2StarLounger
Posts: 170
Joined: 05 Feb 2010, 18:04
Location: Jacksonville, NC

Re: Slide Titles Macro 2007, 2010

Post by teachesms »

It just stopped. Weird. Let me try it again with a couple other presentations. :)
If you can't convince them, confuse them - Harry S. Truman

Nannette

User avatar
teachesms
2StarLounger
Posts: 170
Joined: 05 Feb 2010, 18:04
Location: Jacksonville, NC

Re: Slide Titles Macro 2007, 2010

Post by teachesms »

It worked fine...Sorry. I don't know, it's not Monday is it? LOL

Well, maybe someone else can use the code so this post won't be a total loss.

Thanks Rudi

Nannette
If you can't convince them, confuse them - Harry S. Truman

Nannette

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

Re: Slide Titles Macro 2007, 2010

Post by Rudi »

The code is very useful. :smile:
I recall the old versions of PowerPoint used to have a toolbar button to create a Index of slides (not hyperlinked), but this was removed in the ribbon versions (AFAIK); unless its still hidden in the QAT commands.
Regards,
Rudi

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

User avatar
teachesms
2StarLounger
Posts: 170
Joined: 05 Feb 2010, 18:04
Location: Jacksonville, NC

Re: Slide Titles Macro 2007, 2010

Post by teachesms »

Yes, I remember that. It was a summary slide and another they took away that was useful was the annotations. I liked taking notes on the slide as the presentation ran, then as the slide show ended the annotations were automatically added to a final slide so that the presenter could review all notes with the audience before they left the conference room. Some changes are not for the better. :)
If you can't convince them, confuse them - Harry S. Truman

Nannette

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

Re: Slide Titles Macro 2007, 2010

Post by Rudi »

I recall that...
Now its the ability to save the pen scribbles on each slide and toggle them on/off using review....
They are not all in one location...but better that the feature being fully scrapped!

See: http://www.dvd-ppt-slideshow.com/blog/h ... oint-2010/
Regards,
Rudi

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

User avatar
teachesms
2StarLounger
Posts: 170
Joined: 05 Feb 2010, 18:04
Location: Jacksonville, NC

Re: Slide Titles Macro 2007, 2010

Post by teachesms »

Yah, it's at least "sorta" useful LOL...Just as soon have my note slide (annotation slide) returned. They also took the Conditional Sum Wizard out of Excel, and it was these two things together that I miss the most. :(
If you can't convince them, confuse them - Harry S. Truman

Nannette

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

Re: Slide Titles Macro 2007, 2010

Post by Rudi »

LOL.... We end users can't but have to live with the changes...
At least it's balanced out with new feature too.
Regards,
Rudi

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

User avatar
teachesms
2StarLounger
Posts: 170
Joined: 05 Feb 2010, 18:04
Location: Jacksonville, NC

Re: Slide Titles Macro 2007, 2010

Post by teachesms »

Can you tell I'm one of those people who calls the glass half empty? Hehe! Yes, there are new features that are way cool, like removing backgrounds...so should start looking at it like the glass is half full. :)
If you can't convince them, confuse them - Harry S. Truman

Nannette

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

Re: Slide Titles Macro 2007, 2010

Post by Rudi »

teachesms wrote:Can you tell I'm one of those people who calls the glass half empty? Hehe! Yes, there are new features that are way cool, like removing backgrounds...so should start looking at it like the glass is half full. :)
Office 2013 should have you grinning then.... :wink:
It is full of some radically nice features like : Recommended charts and pivots, predictive or smart autofill, etc.... Very cool!!!
Regards,
Rudi

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

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

Re: Slide Titles Macro 2007, 2010

Post by HansV »

As for the conditional sum wizard: starting with Excel 2007, you can use the much more efficient new function SUMIFS. This function, and its cousins COUNTIFS and AVERAGEIFS, support multiple conditions:

=SUMIFS(range_to_sum, criteriarange1, condition1, criteriarange2, condition2, ...)
Best wishes,
Hans

User avatar
teachesms
2StarLounger
Posts: 170
Joined: 05 Feb 2010, 18:04
Location: Jacksonville, NC

Re: Slide Titles Macro 2007, 2010

Post by teachesms »

LOL Hans, Yes, the IFS functions are handy...but I still liked the wizard. Sigh!

@ Rudi, yes, I teach 2007, 2010 and 2013...so am familiar with all of them.
If you can't convince them, confuse them - Harry S. Truman

Nannette