Show me the built in properties and their values
Problem
You're looking for a way to get at a particular property from among PowerPoint's many built-in document properties.
Solution
First, you need to know the name of the property you're looking for. Run this code in the VB editor to get a list:
Sub ListBuiltInProperties() Dim x As Long On Error Resume Next Debug.Print "BEGIN ====================================" With ActivePresentation.BuiltInDocumentProperties For x = 1 To .Count Debug.Print "Property Number: " & CStr(x) Debug.Print "Property Name: " & .Item(x).Name Debug.Print "Property Value: " & .Item(x).Value Next Debug.Print "END ====================================" End With End Sub
Find the property you're looking for (or just check the example results below)
To display the value of a particular property, Template for example:
With ActivePresentation MsgBox .BuiltInDocumentProperties("Template").Value End With
To change the value of a property that's not Read-Only:
With ActivePresentation .BuiltInDocumentProperties("Template") = "TopSecret!!!" End With
Here's what the code gives me on my system:
BEGIN ==================================== Property Number: 1 Property Name: Title Property Value: PowerPoint Presentation Property Number: 2 Property Name: Subject Property Value: Property Number: 3 Property Name: Author Property Value: Steve Rindsberg Property Number: 4 Property Name: Keywords Property Value: Property Number: 5 Property Name: Comments Property Value: Property Number: 6 Property Name: Template Property Value: C:\Program Files\Microsoft Office\Templates\Presentation Designs\Romanesque.pot Property Number: 7 Property Name: Last author Property Value: Property Number: 8 Property Name: Revision number Property Value: Property Number: 9 Property Name: Application name Property Value: Microsoft PowerPoint Property Number: 10 Property Name: Last print date Property Number: 11 Property Name: Creation date Property Value: 10/14/2005 1:22:28 PM Property Number: 12 Property Name: Last save time Property Value: 12/3/1998 5:21:09 PM Property Number: 13 Property Name: Total editing time Property Value: 0 Property Number: 14 Property Name: Number of pages Property Number: 15 Property Name: Number of words Property Value: 0 Property Number: 16 Property Name: Number of characters Property Number: 17 Property Name: Security Property Number: 18 Property Name: Category Property Value: Property Number: 19 Property Name: Format Property Value: On-screen Show Property Number: 20 Property Name: Manager Property Value: Property Number: 21 Property Name: Company Property Value: RDP Property Number: 22 Property Name: Number of bytes Property Value: 59866 Property Number: 23 Property Name: Number of lines Property Number: 24 Property Name: Number of paragraphs Property Value: 0 Property Number: 25 Property Name: Number of slides Property Value: 1 Property Number: 26 Property Name: Number of notes Property Value: 0 Property Number: 27 Property Name: Number of hidden Slides Property Value: 0 Property Number: 28 Property Name: Number of multimedia clips Property Value: 0 Property Number: 29 Property Name: Hyperlink base Property Value: Property Number: 30 Property Name: Number of characters (with spaces) END ====================================
See How do I use VBA code in PowerPoint? to learn how to use this example code.