Solved

PowerPoint 2013: Which slides are using a particular slide layout

Posted on 2016-11-25
6
70 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 10

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 23

Expert Comment

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever been sent a PowerPoint presentation file and wondered why it filled your mailbox? Or have you ever sent a PowerPoint presentation by email and received complaints about the size? Or have you ever created a PowerPoint presentation and t…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This video teaches viewers how to add simple and professional themes to their slides.
This video teaches viewers how to create handouts from their slides and helps them decide how many slides to include per handout.

863 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

16 Experts available now in Live!

Get 1:1 Help Now