DocumentProperty Object

Description

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"