DocumentProperties Collection Object
Description
A collection of DocumentProperty objects. Each DocumentProperty object represents a built-in or custom property of a container document.
Using the DocumentProperties Collection
Use the BuiltinDocumentProperties property to return a DocumentProperties collection that contains all the built-in properties of a container document. Use the CustomDocumentProperties property to return a DocumentProperties collection that contains all the custom properties of the document.
Use the Add method to create a new custom property and add it to the DocumentProperties collection. You cannot use the Add method to create a built-in document property.
Use BuiltinDocumentProperties(index), where index is the 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 number of the custom document property, to return a DocumentProperty object that represents a specific custom document property.
Properties
Application property, Count property, Creator property, Item property (DocumentProperties collection), Parent property.
Methods
Add method (DocumentProperties collection).
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.
The following example displays the names of the built-in document properties as a list on worksheet one.
rw = 1
Worksheets(1).Activate
For Each p In ActiveWorkbook.BuiltinDocumentProperties
Cells(rw, 1).Value = p.Name
rw = rw + 1
Next