DocumentProperty Object

Description

Represents a custom or built-in document property of a container document. The DocumentProperty object is a member of the DocumentProperties collection.

Using the DocumentProperty Object

Use BuiltinDocumentProperties(index), where index is the name or index number of the built-in document property, to return a single DocumentProperty object that represents a specific built-in document property. Use CustomDocumentProperties(index), where index is the name or index number of the custom document property, to return a DocumentProperty object that represents a specific custom document property.

The names of all the available built-in document properties are shown in the following list:

  • Title
  • Subject
  • Author
  • Keywords
  • Comments
  • Template
  • Last Author
  • Revision Number
  • Application Name
  • Last Print Date
  • Creation Date
  • Last Save Time
  • Total Editing Time
  • Number of Pages
  • Number of Words
  • Number of Characters
  • Security
  • Category
  • Format
  • Manager
  • Company
  • Number of Bytes
  • Number of Lines
  • Number of Paragraphs
  • Number of Slides
  • Number of Notes
  • Number of Hidden Slides
  • Number of Multimedia Clips

Container applications don't necessarily define a value for every built-in document property. If a given application doesn't define a value for one of the built-in document properties, returning the Value property for that document property causes an error.

Properties

Application property, Creator property, LinkSource property, LinkToContent property, Name property, Parent property, Type property, Value property.

Methods

Delete method.

Specifics (Microsoft Excel)

Each workbook has a collection of built-in document properties and a collection of custom document properties. Each collection is represented by a DocumentProperties object, and each collection contains individual DocumentProperty objects.

Use the BuiltinDocumentProperties property to return the collection of built-in document properties, and use the CustomDocumentProperties property to return the collection of custom document properties. Use the Item property to return a single member of the collection.

The following example sets the value of the built-in document property named "Title."

ActiveWorkbook.BuiltinDocumentProperties.Item("Title") _
    .Value = "Year-End Sales Results"