Results 1 to 8 of 8
  1. #1
    Star Lounger
    Join Date
    Feb 2003
    Location
    Annapolis, Maryland, USA
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts

    list of slides (2002 sp3)

    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
    Michael Coleman
    BOMI International

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: list of slides (2002 sp3)

    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.T extRange.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.

  3. #3
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: list of slides (2002 sp3)

    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:
    <pre>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
    </pre>

    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  4. #4
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post
    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)

    [attachment=85845:Capture.JPG]

    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.
    Attached Images Attached Images
    Regards,
    Rudi

  5. #5
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts
    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.

  6. #6
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post
    [quote name='StuartR' post='796642' date='06-Oct-2009 20:27']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.[/quote]

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

  7. #7
    3 Star Lounger
    Join Date
    Feb 2007
    Location
    Durham, Durham, United Kingdom
    Posts
    286
    Thanks
    0
    Thanked 10 Times in 10 Posts
    That's a neat trick Hans!

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    [quote name='JohnWilson' post='796949' date='08-Oct-2009 17:17']That's a neat trick Hans![/quote]
    Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •