Solved

PowerPoint 2013: Which slides are using a particular slide layout

Posted on 2016-11-25
6
38 Views
Last Modified: 2016-11-27
errI have a layout that's used by quite a number of slides. However, in slide master view, all I see are a few slide numbers and then dots (ellipses)
I want to see which layout is used by which slides.
How can I do this?
See my problem in the graphic below.
0
Comment
Question by:brothertruffle880
6 Comments
 
LVL 24

Assisted Solution

by:Echo_S
Echo_S earned 125 total points
ID: 41901628
Manually, there's really no good way to do this. You'd have to switch to Normal view and select each slide and then click the Layout button to see which has been applied.

I'm sure Jamie or John will be along to tell us how it can be done with code!

Oh, one trick is to put a rectangle or textbox just off one edge of the layout (in the workspace), then when you look at the slides in Normal view, you can see the label in the workspace. It won't show in slide show view, but it will help you identify which layout is in use.
0
 
LVL 23

Assisted Solution

by:JSRWilson
JSRWilson earned 125 total points
ID: 41901714
This should give you a printable record.

Sub which_LO()
   Dim L As Long
   Dim strReport As String
   Dim strCL As String
   Dim strSld As String
   Dim osld As Slide
   Dim iFileNum As Integer
   Dim filePath As String

   filePath = Environ("USERPROFILE") & "\Desktop\Layouts.txt"
   iFileNum = FreeFile

   For L = 1 To ActivePresentation.SlideMaster.CustomLayouts.Count
      strCL = ActivePresentation.SlideMaster.CustomLayouts(L).Name
      For Each osld In ActivePresentation.Slides
         If osld.CustomLayout.Index = L Then strSld = strSld & "Slide: " & osld.SlideIndex & " / "
      Next osld
      If strSld <> "" Then
         strSld = Left(strSld, Len(strSld) - 3)
         strReport = strReport & strCL & vbCrLf & strSld & vbCrLf & vbCrLf
         strSld = ""
         strCL = ""
      End If
   Next L
   
   Open filePath For Output As iFileNum
   Print #iFileNum, strReport
   Close #iFileNum
   Call Shell("NOTEPAD.EXE " & filePath, vbNormalFocus)
End Sub

Open in new window

0
 
LVL 9

Accepted Solution

by:
Jamie Garroch earned 250 total points
ID: 41901735
Thanks for tempting me Echo!

Here's a macro that should do what you want:

Option Explicit

' =================================================================
' PowerPoint VBA macro to show the assignment of layouts to slides
' Note : assumes there is only one slide master
'        (but could be modified to cope with more)
' Written by : Jamie Garroch of YOUpresent Ltd.
' Date : 25NOV2016
' =================================================================
Sub ShowLayoutUse()
  Dim oSld As Slide
  Dim Msg As String
  Dim ArrLayouts() As String
  Dim LayoutIndex As Long
  Dim counter As Long
  
  Msg = "Layouts assigned to the following slides:" & vbCrLf
  
  With ActivePresentation
    ReDim ArrLayouts(1 To .SlideMaster.CustomLayouts.Count)
    For Each oSld In .Slides
      LayoutIndex = oSld.CustomLayout.Index
      ArrLayouts(LayoutIndex) = ArrLayouts(LayoutIndex) & IIf(ArrLayouts(LayoutIndex) = "", "", ",") & oSld.SlideIndex
    Next
    For counter = 1 To .SlideMaster.CustomLayouts.Count
      Msg = Msg & IIf(Msg = "", "", vbCrLf) & .SlideMaster.CustomLayouts(counter).Name & " : " & ArrLayouts(counter)
    Next
  End With
  
  MsgBox Msg, vbOKOnly, "Layouts Assignment - a Macro by YOUpresent.co.uk"
End Sub

Open in new window


Example output:

Layouts macro output
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 23

Expert Comment

by:JSRWilson
ID: 41901762
She's just a temptress!
1
 
LVL 9

Expert Comment

by:Jamie Garroch
ID: 41901770
And you sir. Well, you're just too fast. I'm going to start calling you speedy Gonazales. Arriba arriba!
0
 

Author Closing Comment

by:brothertruffle880
ID: 41903509
Wow.  Great help.  Thanks to all!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article shows how to simulate drawing numbers or names from a hat or bag using vba in PowerPoint and prevents duplicate items being selected. It’s not difficult to choose a (semi) random number in vba. The RND function returns a decimal numb…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
This video teaches viewers how to add simple and professional themes to their slides.
The viewer will learn how to edit animations within the presentation, incorporate sound, and set everything up with timing.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now