Automatically Create Summary Slides in PowerPoint 2010 for Free!
*UPDATE* Please see part two of this blog post for an updated version that creates a auto summary slides for PowerPoint 2010 with hyperlinks!
Download the Create Summary Slide Macro PowerPoint 2010 slide deck here.
Not strictly SharePoint Architect related, but I cooked this VBA script up whilst working on my latest SharePoint 2010 Developer courseware.
In PowerPoint 2003 and earlier there was a button you could press that would automagically create a Summary Slide or Table of Contents Slide for you based upon slides you’d selected in Slide Sorter.
It got taken away in PowerPoint 2007, and it’s still missing in 2010! So tonight I wrote this macro. Apologies for any errors. It’s very, very late.
1: '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
2: ''' InsertSummary()
3: ''' by Joel Jeffery (http://joelblogs.co.uk) August 2010
4: ''' Creates a Summary Slide for PowerPoint 2010
5: ''' (and probably 2007 too!)
6: ''' Depends: Requires QSortInPlace by Chip Pearson
7: ''' Usage: Select Slides (e.g. in Slide Sorter) and run
8: ''' this macro.
9: ''' License: Creative Commons Public Domain 2010
10: '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
11: Sub InsertSummary()
12: Dim i As Integer
13: Dim strSel As String, strTitle As String
14: Dim summary As Slide
15:
16: 'Only run if we've got something selected
17: If ActiveWindow.Selection.SlideRange.Count > 0 Then
18: 'Array to hold the order of the slides...
19: 'We do this or we build the ToC in the order
20: 'in which the slides were selected :)
21: Dim slideOrder() As Integer
22:
23: 'Size this to the number of slides selected
24: ReDim slideOrder(1 To ActiveWindow.Selection.SlideRange.Count)
25:
26: 'Collect all the IDs of the selected slides
27: For i = 1 To ActiveWindow.Selection.SlideRange.Count
28: slideOrder(i) = ActiveWindow.Selection.SlideRange(i).SlideIndex
29: Next
30:
31: 'Sort them with the QSort Algorithm
32: 'By Chip Pearson, www.cpearson.com, chip@cpearson.com
33: QSortInPlace slideOrder
34:
35: 'Iterate over the slides in Index order
36: For o = 1 To UBound(slideOrder)
37: If ActivePresentation.Slides(slideOrder(o)).Shapes.HasTitle Then
38: 'Build up the ToC Text
39: strTitle = ActivePresentation.Slides(slideOrder(o)).Shapes.Title.TextFrame.TextRange.Text
40: strSel = strSel & strTitle & vbCrLf
41: End If
42: Next
43:
44: 'Create the summary slide before the first slide in the selection
45: Set summary = ActivePresentation.Slides.Add(slideOrder(1), ppLayoutText)
46: 'Add the title
47: summary.Shapes(1).TextFrame.TextRange = "Module Summary"
48: 'Add the ToC text
49: summary.Shapes(2).TextFrame.TextRange = strSel
50: End If
51: End Sub
52:
To the extent possible under law, Joel Jeffery has waived all copyright and related or neighbouring rights to InsertSummary() Macro for PowerPoint 2010. This work is published from United Kingdom. Why am I bothering to licensed this under Creative Commons? Because some folks are selling similar functionality as a PowerPoint Add-In and I think it should be free. Enjoy!
You’ll also need the QSortInPlace method by Chip Pearson.
To use, simply select all the slides you want to use for your summary (for instance, in Slide Sorter view) and run the InsertSummary() macro.
Here’s the result:
One bullet point bearing the title of each slide you include.
Enjoy!
You can leave a response, or trackback from your own site.


Nice but could that script also do hyperlinks to slides automatically?
Mmmm. I like a challenge…
If I add the following code to the InsertSummary() macro:
' By popular demand...! ;)
If CreateHyperlinks Then
'Add Hyperlinks :)
For o = 1 To UBound(slideOrder)
If ActivePresentation.Slides(slideOrder(o) + 1).Shapes.HasTitle Then
'Build up the ToC Text
strTitle = ActivePresentation.Slides(slideOrder(o) + 1).Shapes.Title.TextFrame.TextRange.Text
With summary.Shapes(2).TextFrame.TextRange.Paragraphs(o).ActionSettings(ppMouseClick)
.Action = ppActionHyperlink
.Hyperlink.Address = ""
.Hyperlink.SubAddress = ActivePresentation.Slides(slideOrder(o) + 1).SlideID & "," & ActivePresentation.Slides(slideOrder(o) + 1).SlideIndex & "," + strTitle
End With
End If
Next
End If
And change the method signature of the macro to:
Sub InsertSummary(Optional CreateHyperlinks As Boolean)
…then yes: It now supports hyper links.
To make it easy to add this macro to the UI, you would also need to add this subroutine:
Sub InsertSummaryWithHyperlinks()
InsertSummary CreateHyperlinks:=True
End Sub
Now we can add both InsertSummary() and InsertSummaryWithHyperlinks() to our PowerPoint Quick Access Toolbar!
I will post a follow up article with the full source attached asap.
Thanks for the idea! :o)
For us non-tech folks, how do i make QSortInPlace method by Chip Pearson work? I went to his site and it was all Greek to me. Is it another Macro or something more?
Hi Margaux!
Welcome to my blog! Thanks for finding me!
Chip Pearon’s “QSortInPlace” is indeed a VBA macro. If you’re non-technical, I’d recommend not putting all the pieces together yourself. Instead, you can download the completed deck here: Joel’s Create Summary Slide Macro PowerPoint 2010 Slide Deck. Let me know if it’s not working for you, and I can walk you through it.
Joel
Joel,
I understand Visual Basic at a middle school level. Most of my experience is in excel and access. I want to create buttons that (upon click) will pop up different slides. I can not find how to define slides seperately. Could you help me with this? I am available today for a quick phone call if need be.
Thanks, Ben
Hi Ben!
Thanks for visiting!
You can probably do this without any coding at all :)
If you want a shape to act as a button and take you to a slide of your choice, you can always:
How about that?
Let me know how you get on.
joel
Joel;
This is a simple solution to address that missing functionality – thanks for your late-night work :)
You seem to understand the hyperlinks process – whenever I embed a hyperlink (either text or image) to another slide within the same document and I click on the link powerpoint wants to open another copy of the current document. How do I get the behavior similar to a Word bookmark?
Thanks
Your program is really amazing…what a time saver. Thank you. But can I also link the page numbers from the slides into my table of contents?
When I move the slides around, which I do because it is a “living” document, I want to have the TOC capture those movements and update the page numbers right along with me.
Possible?
Many thanks. The TOC is not perfect, but it’s already much better than nothing.
Thanks again!
Very useful program! Many thanks for your share.
it does not work for me. The macro just creates a page with the title “Module Summary” and an empty text box – and thats it.
oh well – I can do it manually.
Hi Kurt!
Thanks for the feedback. Could you let me know which version of PowerPoint you’re using, or let me know if you’re happy to send me a PowerPoint deck that didn’t work for you, and I can try to investigate?
Thanks,
joel
Thanks so much for this great solution. I added a quick piece of code to put in page numbers. I added 1 to the slide number to account for the new TOC slide, so there may be cases where this may be off for you depending on how your deck is numbered. The new code is the two lines above the End If statement below.
‘Iterate over the slides in Index order
For o = 1 To UBound(slideOrder)
If ActivePresentation.Slides(slideOrder(o)).Shapes.HasTitle Then
‘Build up the ToC Text
strTitle = ActivePresentation.Slides(slideOrder(o)).Shapes.Title.TextFrame.TextRange.Text
intSlideNumber = ActivePresentation.Slides(slideOrder(o)).SlideNumber
strSel = strSel & strTitle & “……….” & intSlideNumber + 1 & vbCrLf
End If
Next
Hi Jay!
Thanks for the comment!
I’ll have a look at your algorithm and see if I can include it in the next version of the slide deck.
Best wishes,
joel
Hi Jay,
I am looking for a TOC with page numbers which will update automatically if I shift the slides. I think this is what your algorithm is about.
@Joel: As I have no idea of VBA and the like, could you please add that in a new version as a download like the previous macro? Or at least walk me through, where I have to add Jay’s algorithm. Thanks!
Hi Joel,
Thanks for this solution. I would like to know if we can export to PDF and generate bookmarks (for the PDF reader) with the hyperlinks (generated by your VB macro). It would be very great if we can do such things.
Best regards, Martin
Hi Martin,
Thanks for posting!
If you go File -> Save As and pick PDF format, PowerPoint will export you a PDF that preserves the bookmark hyperlinks.
How cool is that?
joel
Here is a way to create a summary page (or table of contents) in PowerPoint using VBA without underlining.
”””””””””””””””””””””””””””””’
”’ InsertTOCPage(Optional CreateHyperlinks As Boolean)
”’ by Charles Morrison June 2011
”’ from a script by Joel Jeffery (http://joelblogs.co.uk)
”’ Creates a TOC Slide for PowerPoint 2010
”’ (and probably 2007 too!)
”’ Depends: Requires QSortInPlace by Chip Pearson
”’ Usage: Select Slides (e.g. in Slide Sorter) and run
”’ this macro.
”’ License: Creative Commons Public Domain 2010
”””””””””””””””””””””””””””””’
Sub CreateTOCPage(Optional CreateHyperlinks As Boolean)
Dim i As Integer
Dim TOC As Slide
Dim strTOC_arr(1 To 51) As String
‘Only run if we’ve got something selected
If ActiveWindow.Selection.SlideRange.Count > 0 Then
‘Array to hold the order of the slides…
‘We do this or we build the ToC in the order
‘in which the slides were selected :)
Dim slideOrder() As Integer
‘Size this to the number of slides selected.
ReDim slideOrder(1 To ActiveWindow.Selection.SlideRange.Count) ‘ zero is not the count of a slide and a slide will be inserted which throws off the count.
‘Collect all the page numbers of the selected slides into the slideOrder array
For i = 1 To ActiveWindow.Selection.SlideRange.Count
slideOrder(i) = ActiveWindow.Selection.SlideRange(i).SlideIndex
Next
‘Sort them with the QSort Algorithm
‘By Chip Pearson, http://www.cpearson.com, chip@cpearson.com
QSortInPlace slideOrder
‘ get titles before the TOC slide is inserted, otherwise the number and title of the slide gets captured as part of the arrays.
‘ but also then must add 1 to the page number.
‘Fill the strTOC_arr array with the titles for the selected slides.
‘ a trouble here is that the content page is selected also.
For i = 1 To UBound(slideOrder)
If ActivePresentation.Slides(slideOrder(i)).Shapes.HasTitle Then
‘Populate the array containing the ToC Text
strTitle = ActivePresentation.Slides(slideOrder(i)).Shapes.Title.TextFrame.TextRange.Text
strTOC_arr(i) = strTitle & ” . . . . . . . . . . . . . . . . . . . . ” & slideOrder(i) + 1 & vbCrLf ‘ <<=== here we add a one to the page number to make up for inserting the TOC slide.
End If
Next
'Create the TOC slide and title before the first slide in the selection
' Create this page first so that subsequent slides will be numbered correctly and this page's tilte is not captured.
Set TOC = ActivePresentation.Slides.Add(2, ppLayoutText) ' Make the TOC the second slide
'Add the title to the TOC page.
TOC.Shapes(1).TextFrame.TextRange = "Contents" 'shape 1 is the default caption in all PowerPoint slides
TOC.Shapes(1).TextFrame.TextRange.Font.Size = 30
' On the TOC page, delete the default text box with bullets. If you like bullets, comment this out.
TOC.Shapes.Item(2).Delete
' start making new text boxes, and adding a hyperlink to the box rather than the text
' this makes hyperlinks without underlining.
If CreateHyperlinks Then
'Loop through the array of slides with titles
For i = 1 To UBound(slideOrder)
If ActivePresentation.Slides(slideOrder(i)).Shapes.HasTitle Then
'make the textboxes Left, top, width, height
TOC.Shapes.AddTextbox msoTextOrientationHorizontal, 20, 80 + (30 * i), 750, 20 '80 = reasonable starting point down the page.
' add text
TOC.Shapes(i + 1).TextFrame.TextRange = strTOC_arr(i) ' this will also start at 2 since the array is dimensioned that way.
' add hyperlink to text box
TOC.Shapes(i + 1).ActionSettings(ppMouseClick).Hyperlink.Address = ""
TOC.Shapes(i + 1).ActionSettings(ppMouseClick).Hyperlink.SubAddress = ActivePresentation.Slides(slideOrder(i) + 1).SlideID & "," & ActivePresentation.Slides(slideOrder(i) + 1).SlideIndex & "," + strTOC_arr(i)
' Format the text
TOC.Shapes(i + 1).TextFrame.TextRange.Paragraphs.Font.Bold = msoFalse
TOC.Shapes(i + 1).TextFrame.TextRange.Paragraphs.Font.Size = 20
TOC.Shapes(i + 1).TextFrame.TextRange.Paragraphs.Font.Color.RGB = RGB(0, 0, 0)
' If for some reason you want underlined blue hyperlinks
'TOC.Shapes(i + 1).TextFrame.TextRange.Paragraphs.Font.Color.RGB = RGB(0, 0, 255)
'TOC.Shapes(i + 1).TextFrame.TextRange.Paragraphs.Font.Underline = msoTrue
'other options
'TOC.Shapes(i + 1).TextFrame.TextRange.Paragraphs.Font.Italic = msoTrue
'TOC.Shapes(i + 1).TextFrame.TextRange.Paragraphs.Font.Shadow = msoTrue
End If
Next
End If
End If
End Sub
Sub InsertTOC()
CreateTOCPage CreateHyperlinks:=False
End Sub
Sub InsertTOCWithHyperlinks()
CreateTOCPage CreateHyperlinks:=True
End Sub
Hey, that’s cool! Many thanks for posting!
joel
I really like what Charles posted where it doesn’t do the underlined hyperlinks; however, it didn’t work on my file where your underlined version did. Did you test Charles version? Would love to have a working version of ‘without underlined hyperlinks’…
OMG, I’m just about at the end of my rope. I’ve got this huge (80-pg) powerpoint presentation (yah, 80 pages) that my boss wants to use to train people on our software. However, without a TOC feature in PowerPoint 2010, I’m totally lost. How can a VBA illiterate person such as myself take advantage of what I’m guessing is a totally cool trick you’ve shared here???
Please…I’ll be eternally grateful if you can help me out!
Hi Karen. Thanks for finding us.
I think if you download the PowerPoint macro deck here: http://cdn.joelblogs.com/wp-content/uploads/2010/09/Joels-Powerpoint-Macros-2010-v1.2.pptm
…you can then follow the steps on this page (http://joelblogs.co.uk/2010/08/13/automatically-create-summary-slides-in-powerpoint-2010/) to use the macro do to exactly what you want.
Let me know if there’s any steps you need help with :)
joel
Hello
my ppt is about 120 page.
first:
With your macro i get one slide – and i must make additional slides and copy the contents to this slides to get all the text on.
second:
I also need the page number of the slides. For example:
1 composite Materials 1
1.1 carbon fibre 2
I found a german page with a very strong addin – but this will not work on ppt 2007/2010. (www.pptrick.de)
I’m trying to write code that will take the section titles of each section in a powerpoint presentation and create a text box at the top of each page with the text being the name of the section each slide exists in. I can get all the section titles using the SectionProperties object but I can’t figure out how to properly loop through all the slides and insert the text box with the name of section on each slide. Any help would be greatly appreciated.
Thomas
Hi Joel, thanks for the code. I have been searching for sumthing similar and you saved my life. However what i was looking at is to create title slides from summary slide with links. And these should be on all slides. sumthing like breadcrumbs we have in webiste. Any help on this will be highly appreciated. Im trying to automate a process we have in our company.
Hey Joel – thanks so much for the deck with summary code built in, really appreciated. Any feel when you’d be making available a version that also add slide numbers to the summary? Love your work, all the best Jac’
Joel,
Love your singing. Is there a way to create a slide share webpart in SharePoint which allows viewing without opening the presentation? Is a SlideShare, YouTube or a similar plug-in available for SharePoint?
V/R
Bill in Virginia
Hi Bill!
Thanks for the kind words :)
I think you could achieve what you want by installing Office Web Apps for SharePoint. There are whitepapers here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=2613 and the download for Office Web Apps is linked to from here: http://technet.microsoft.com/en-us/office/ee815687.aspx
If you’re unable to install Office Web Apps yourself, you could upload the PowerPoint deck to SkyDrive and use Office Web Apps in the cloud and possibly use this technique to embed the PowerPoint deck on your SharePoint page: http://office.microsoft.com/en-us/web-apps-help/embed-a-powerpoint-presentation-on-a-web-page-HA102029513.aspx.
Hope this helps!
joel
Joel
This macro rocks! Thank you – you have saved me hours of tedious work!!
Really appreciate it!
Vera
You’re welcome! Thanks for the kind words!
joel
Hi. Thanks for the macro.
It is possible to change it like this:
a) bullet level 1 are sections of the presentation
b) bullet level 2 are the hyperlinked slides of the section
c) add the summary at the end (my use is: I start the presentation [F5] and once I come to the end and questions are asked, I press [End] so that I can navigate to slides easily. Putting them at first position “destroys” my title page.)
It was not much work to achieve this manually, though.
BTW: why did you need sorting? I just removed the sorting and everything was ok as well.
Thanks.
Ok, sorting is needed if single slides are selected. That’s not what I do. I always use Ctrl+A…
Great piece of work ! alas I am completely unable to get it to work in all my presentations. Eg I would like to have the scripts available in all my presentations as a standard. How can i do this ? Your explanations in the pptm itself are not enough for the d… boy i am
Thanks
I inserted your macro into my toolbar; however, when I click on it, I get a message stating, “The macro cannot be found or has been disabled because of your security settings.” I have enabled all macros, and I have enabled Developer Macro settings. What else should I try?
Hi, I added this macro and working no problem, using the non-underlined text and the page numbering. Would it be possible to insert a table and add the page titles to the left column and the numbers to the right? I’ve had a go, and I can’t see beyond adding a table of the correct number of rows and columns! Thanks anyway for the neat macro.
Tried to download Qsortinplace but site timed out
Is there any other source
Hi Al,
I think that just have been a temporary blip. Chip’s site is online now.
http://www.cpearson.com/excel/SortingArrays.aspx
joel
Thanks a lot Joel,
It works well, very usefull!
stef
Hi!!, congratulations for developing this macro. I’ve just run it and worked quite well in Power Point 2007.
I was wondering how difficult could it be to add a slide number on the right of the slide id?.
Regards from Mexico
Thanks for the Macro!
I would like to echo the other comments about adding the slide numbers.
Also, possibly being able to change the in the macro.
Thanks again!
That slide summary automatism is brilliant! So much time wasted because MS decided to NOT include this feature any more. Thanks for that.
Hi,
thanks for the macro.
But I have a problem. It doesn’t work when i’m using a presentation-template. Do I have to configure anything in the master-view?
Many Thanks.
Rocking………..thanks.
Hi Joel,
The macro code for InsertSummaryHyperlink is fantastic,it works great..Kudos and this Macro rocks forever, however the table of contents with hyperlink helps to link to any number of Slides
I would like to know, whether there are any automation with macro or functionality where I can go to the last slide using InsertSummaryHyperlink code and again go back to the first slide with a single hyperlink click ?
Waiting for your earnest reply..
Merry Christmas and Advance Happy New Year..:-)
Hi Joel / Team ,
To make it simple about my query, I want to know is there any solution for the to insert any image or text hyperlink which will lead us to the index or table of contents slide from the any number of slides inserted in the powerpoint using the QuickSortInPlace algorithm macro code…hope there is a solution for this query too…?
G’day,
Exactly what I was looking for, to create a summary slide. And so elegantly done too!
I will use this technique for keeping my Macro’s in one place – brilliant.
Thanks,
Geoff
Hi,
Thanks for the Code it works fine, however if I have more than 50 slides with title names and run the macro the table of contents slide cannot hold the 50 names in singlie column of the slide, are there any advanced version of this code where the Title names in the table of conetents slide will be splited in to three columns ?