Supercharge your PowerPoint productivity with

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

Tell me about PPTools

Show me the built in properties and their values


PPTools
Shape Styles brings the power of styles to PowerPoint. Apply complex formatting with a single click
Merge Excel, CSV or tab-delimited data into PowerPoint presentations to create certificates, awards presentations, personalized presentations and more
FixLinks prevents broken links when you distribute PowerPoint presentations
Optimizer saves disk space and bandwidth, shrinks your PowerPoint presentations to the right size for email, screenshow or printing
PPT2HTML gives you full control of PowerPoint HTML output, helps meet Section 508 accessibility requirements
Prep4PDF preserves interactivity in PowerPoint presentations when you convert to PDF
Image Export converts PowerPoint slides to JPG, PNG, GIF, WMF and more

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.


Page copy protected against web site content infringement by Copyscape Contents © 1995-2008 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.

Español    Deutsch    Français    Português    Italiano    Nederlands    Greek    Japanese    Korean    Chinese



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 built in properties and their values
http://www.pptfaq.com/FAQ00751.htm
Last update 09 September, 2006