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 the .Type of each object on a slide

This macro from Brian Reilly and Naresh Nichani tells you the .Type of each shape on a slide:

Sub Object_Types_on_This_Slide()
	'Refers to each object on the current page and returns the Shapes.Type
    'Can be very useful when searching through all objects on a page
    Dim it As String
    Dim i As Integer
    '''''''''''''''''
    'Read-only  Long
    '''''''''''''''''

    For i = 1 To ActiveWindow.Selection.SlideRange.Shapes.Count
        'No need to select the object in order to use it
        With ActiveWindow.Selection.SlideRange.Shapes(i)
            'But it is easier to watch when the object is selected
            'This next line is for demonstration purposes only. It is not necessary
ActiveWindow.Selection.SlideRange.Shapes(i).Select
            ''''''''''''''''''''''''
            Select Case .Type
                Case msoAutoShape                          'Type 1
                    it = "an AutoShape"
                Case msoCallout                            'Type 2
                    it = "a Callout"
                Case msoChart                              'Type 3
                    it = "a Chart"
                    ' Note that you'll never actually SEE one of these in PPT.  It's an Excel-only thing.
                Case msoComment                            'Type 4
                    it = "a Comment"
                Case msoFreeform                           'Type 5
                    it = "a Freeform"
                Case msoGroup                              'Type 6
                    it = "a Group"
                Case msoEmbeddedOLEObject                  'Type 7
                    it = "an Embedded OLE Object"
                Case msoFormControl                        'Type 8
                    it = "a Form Control"
                Case msoLine                               'Type 9
                    it = "a Line"
                Case msoLinkedOLEObject                    'Type 10
                    it = "a Linked OLE Object"
                    With .LinkFormat
                        MsgBox (.SourceFullName)
                    End With
                Case msoLinkedPicture                      'Type 11
                    it = "a Linked Picture"
                    With .LinkFormat
                        MsgBox (.SourceFullName)
                    End With
                Case msoOLEControlObject                   'Type 12
                    it = "an OLE Control Object."
                Case msoPicture                            'Type 13
                    it = "a embedded picture."
                Case msoPlaceholder                        'Type 14
                    it = "a text placeholder (title or regular text--not a standard textbox) object."
                Case msoTextEffect                         'Type 15
                    it = "a WordArt (Text Effect)."
                Case msoMedia                              'Type 16
                    it = "a Media object .. sound, etc."
                    With .LinkFormat
                        MsgBox (.SourceFullName)
                    End With
                Case msoTextBox                            'Type 17
                    it = "a Text Box"
                Case msoScriptAnchor                       'Type # not checked
                    it = " a ScriptAnchor"
                Case msoTable
                    it = " a Table"                        'Type 19
                Case msoShapeTypeMixed                     'Type # not checked
                    it = "a Mixed object (whatever that might be)."
                Case Else                                  'Just in case MS adds some new types
                    it = "a mystery!!! ?An undocumented object type?" & _
                            " Haven't found one of these yet"
            End Select
            MsgBox ("I'm " & it & " Type is # " & .Type)
        End With
    Next i
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 the .Type of each object on a slide
http://www.pptfaq.com/FAQ00007_Show_me_the_-Type_of_each_object_on_a_slide.htm
Last update 07 June, 2011
Created: