PowerPoint Speaker Notes Text to Speech via the Excel Object Model


Back when Office XP was in beta, I was building "Information Worker" demos. One of them was to show how to make PowerPoint "speak" the speaker notes to you. This isn't quite Accessibility at it's finest, but it certainly doesn't hurt. You could figure out how to add closed captioning on top of each slide for better accessibility. However, I'm happy to say that the code I wrote for the demo with Office XP still works in Office 2003. Below are the steps to make PowerPoint speak the speaker notes to you. Keep in mind that I am not really a developer, so the code might not be the most efficient.
Have fun with it and please let me know what you think.

  1. Open PowerPoint
  2. On the Tools menu, point to Macro, and then click Security.
  3. On the Security Level tab, click to select Medium, and then click OK.
  4. On the File menu, click Exit to quit PowerPoint.
  5. Restart PowerPoint for the security level change to take effect.
  6. Open a PowerPoint presentation, or create a new one.
  7. In PowerPoint, select your first slide and enter some text in the Notes field of your slide (if you don't see the Notes page, select View, Normal)
  8. Press ALT+F11 to start the Visual Basic Editor.
  9. On the Insert menu, click Module.
  10. In the Visual Basic Editor, point to References on the Tools menu.
  11. Under Available References, click to select the Excel 11.0 Object Library check box, and then click OK.
  12. Copy and paste the following code into the module:

Sub Present_And_Read_Notes()
    'Declare and create an Excel object
    Dim XLapp As Excel.Application
    Dim SlideCount As Integer
    Set XLapp = CreateObject("Excel.Application")
   
    ActivePresentation.SlideShowSettings.Run
    With SlideShowWindows(1).View
       
        'Figure out how many slides there are in this presentation
        SlideCount = ActivePresentation.Slides.Count
       
        'Loop through each slide and read whatever is in the notes field.
        For i = 1 To SlideCount
            'Speak the text in the Notes field for each slide:
            XLapp.Speech.Speak ActivePresentation.Slides(i).NotesPage.Shapes.Placeholders(2).TextFrame.TextRange.Text
            'Another way to use speech is to just enter text here in the code:
                'XL.Speech.Speak "You can also enter text here to be read during the presentation."
        .Next
        Next
       
        'Close the Excel object and set the object to nothing.
        XLapp.Quit
        Set XLapp = Nothing
       
        'Exit the slideshow
        .Exit
    End With

End Sub

  13. Back in PowerPoint, from the Tools menu, select Macro, Macros Select your macro (Present_And_Read_Notes)
  14. Click Run
The PowerPoint slide should run and you should hear the notes spoken to you via a computerized-sounding voice.

----
Here are some suggestions for you to improve this little sample:

  1. Make the macro automatically run when you start a presentation.
  2. Then make the presentation self-running so that each slide advances to the next after a bit of time. 
  3. Then make the presentation restart after it ends.

Comments (4)
  1. Sue Waetzig says:

    I tried to follow the instructions that you wrote above for one of my students. I have Microsoft Excel 10.0 Object Library instead of the 11.0 that you have listed, but I found other instructions ont another website saying to use 10.0, so I am not sure that is the issue. When I select ‘Run,’ the line in your code ‘Dim XLapp As Excel.Application’ is highlighted and I get the following error message: Compile Error. User-defined type not defined. Can you take pity on a frustrated speech pathologist who knows little to nothing about macros or PC’s and tell me if I can fix this problem so that I can get the Powerpoint presentations read to my student?

    Sue

  2. David H says:

    Yeah same error, I am in the same situation.

    Looks like a great idea though, I want to quiz myself using PowerPoint but I don’t want to read everything into a an audio file and then somehow combine them …ug. Anyway. That’s my situation.

  3. Every once in a while I like to summarize my skills so I can remind myself of my strengths and weaknesses.

Comments are closed.

Skip to main content