Supercharge your PowerPoint productivity with
Supercharge your PPT Productivity with PPTools - Click here to learn more.

Proud member of

PPTools

Image Export converts PowerPoint slides to high-quality images.

PPT2HTML exports HTML even from PowerPoint 2010 and 2013, gives you full control of PowerPoint HTML output, helps meet Section 508 accessibility requirements

Merge Excel data into PowerPoint presentations to create certificates, awards presentations, personalized presentations and more

Resize your presentations quickly and without distortion

Language Selector switches the text in your presentation from one language to another

FixLinks prevents broken links when you distribute PowerPoint presentations

Shape Styles brings styles to PowerPoint. Apply complex formatting with a single click.

Show me a list of designs and which slides use them

Problem

Sometimes it's convenient to have a list of the designs (slide masters) used by a presentation and which slides use them.
This little VBA macro will give you that list.

Solution

Make sure the presentation you want to examine is the currently active presentation then run the macro below.

To keep it simple, we send all the output to the Immediate (or debug) window. Press Ctrl+G while in the VBA editor to make the Immediate window visible. You can select the text there and copy/paste it into Notepad or any other program if you want to hang onto or print the results.

Sub ListDesigns()
  Dim oPres as Presentation
  Dim oSld as Slide
  Dim oDes as Design
  Dim sText as String
  Dim FileNum as Integer
  Dim PathSep as String

  #If Mac Then
      PathSep = ":"
  #Else
      PathSep = "\"
  #End If

  Set oPres = ActivePresentation

  sText =  "=== DESIGNS in this presentation ===" & vbcrlf

  For Each oDes in oPres.Designs
     sText = sText &  oDes.Name & vbCRLF
  Next

  sText = sText &  "=== SLIDES and the Designs they rode in on ===" & vbCRLF

  For Each oSld in oPres.Slides
     sText = sText & "Slide:" & VbTab & oSld.SlideIndex _
     & vbTab & oSld.Design.Name & vbCRLF
  Next

   FileNum = FreeFile
  Open oPres.Path & PathSep & "REPORT.TXT" For Output As FileNum 
  Print #FileNum, sText
  Close FileNum

  MsgBox "Your report is saved as:" & vbCRLF _
                & oPres.Path & PathSep & "REPORT.TXT"

  #If Mac Then
    'MsgBox "Your report is saved as:" & vbCRLF _
                & oPres.Path & PathSep & "REPORT.TXT"
  #Else
    Call Shell("Notepad.exe" & " " &  oPres.Path & PathSep & "REPORT.TXT", vbNormalFocus)
  #End If

   Set oPres = Nothing

End Sub

See How do I use VBA code in PowerPoint? to learn how to use this example code.


Did this solve your problem? If so, please consider supporting the PPT FAQ with a small PayPal donation.
Page copy protected against web site content infringement by Copyscape Contents © 1995 - 2022 Stephen Rindsberg, Rindsberg Photography, Inc. and members of the MS PowerPoint MVP team. You may link to this page but any form of unauthorized reproduction of this page's contents is expressly forbidden.

Supercharge your PPT Productivity with PPTools

content authoring & site maintenance by
Friday, the automatic faq maker (logo)
Friday - The Automatic FAQ Maker

Show me a list of designs and which slides use them
http://www.pptfaq.com/FAQ00820_Show_me_a_list_of_designs_and_which_slides_use_them.htm
Last update 07 June, 2011
Created: