Name

workbook.BuiltinDocumentProperties

Synopsis

Returns the collection of Excel’s built-in document properties. In some cases, properties may not be initialized, so you must use error handling when getting their values. The following code displays the names and settings of all of a workbook’s built-in properties:

Dim prop As DocumentProperty
On Error Resume Next
For Each prop In ActiveWorkbook.BuiltinDocumentProperties
    Debug.Print prop.Name, prop.Value
    If Err Then Debug.Print prop.Name, "Not set."
    Err.Clear
Next
On Error GoTo 0

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.