• list of slides (2002 sp3)

    Author
    Topic
    #428606

    Me again, the ppt novice. Is there a way to create a list of the slide numbers and titles? I tried the summary slide function, but it gave me about seven slides. I just want a list that I can format in Word onto a single sheet.

    Thanks,

    Michael

    Viewing 1 reply thread
    Author
    Replies
    • #996121

      You can create a macro for this:
      – Create a new presentation.
      – Switch to the Visual Basic Editor (Alt+F11)
      – Select Insert | UserForm.
      – The userform won’t be used, it’s only meant to set a reference to the Microsoft Forms library. You can remove the userform if you wish.
      – Select Insert | Module.
      – Copy the following code into the module:

      Sub ListSlides()
      Dim i As Integer
      Dim strList As String
      Dim d As New MSForms.DataObject
      strList = “List of slides in ” & ActivePresentation.Name
      For i = 1 To ActivePresentation.Slides.Count
      strList = strList & vbCrLf & i & vbTab & _
      ActivePresentation.Slides(i).Shapes(1).TextFrame.TextRange.Text
      Next i
      d.SetText strList
      d.PutInClipboard
      Set d = Nothing
      MsgBox “The list of slides is on the clipboard, ” & _
      “ready to be pasted.”, vbInformation
      End Sub

      – Switch back to PowerPoint.
      – Activate the presentation you want to summarize.
      – Press Alt+F8 to open the macro dialog.
      – Specify that you want to see macros in all open presentations.
      – Select ListSlides and click Run.
      – You can now paste the list into a slide, into a Word document, or wherever you like.

      Note: the code will fail or not do what you want if there are slides without a title. You could expand it to take that into account.

      • #1180206

        Hi,

        In PPT 2007, they have removed the summary slide feature. I was wondering if this code could be re-modeled to create a summary slide in PPT2007?

        I tried the code that Hans posted but it debugs on a missing object? (See the image attached)

        PS: Unless code can be generated to automate this feature, I have a tweak…

        1. Open the presentation in Outline view
        2. Select all the text, right click and choose Collapse All Text
        3. Select the titles of the slides (now in collapsed view)
        4. On a new slide, right click in the text placeholder and paste.

        All the slide titles should paste into the placeholder to generate a summary (agenda) slide.

        • #1180207

          You need to add a reference to the Microsoft Forms object library. The easiest way to do this is to add a userform to your project, then delete it again. This will automatically add the reference you need.

          • #1180210

            You need to add a reference to the Microsoft Forms object library. The easiest way to do this is to add a userform to your project, then delete it again. This will automatically add the reference you need.

            TX Stuart, that did the trick. It is working now based on your advice.

    • #996250

      Hans, that is so cool. I had never heard of a DataObject. One additional suggestion is to check to make sure there is a title on the slide. The code then becomes:

      Sub ListSlides()
          Dim i As Integer
          Dim strList As String
          Dim d As New MSForms.DataObject
          strList = "List of slides in " & ActivePresentation.Name
          For i = 1 To ActivePresentation.Slides.Count
              With ActivePresentation.Slides(i)
                  If .Shapes(1).HasTextFrame Then
                      strList = strList & vbCrLf & i & vbTab & _
                          .Shapes(1).TextFrame.TextRange.Text
                  End If
              End With
          Next i
          d.SetText strList
          d.PutInClipboard
          Set d = Nothing
          MsgBox "The list of slides is on the clipboard, " & _
              "ready to be pasted.", vbInformation
      End Sub
      
    Viewing 1 reply thread
    Reply To: list of slides (2002 sp3)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: