CLR - apparently all of the Properties listed as part of the
BuiltInDocumentProperties are not always available to all types of documents.
First, to quote from the Help topic about it:
"Container applications aren’t required to define values for every built-in
document property. If Microsoft Excel doesn’t define a value for one of the
built-in document properties, reading the Value property for that document
property causes an error."
I experimented using the following code:
Sub GetDocumentProperties()
Dim rw As Integer
Dim p As Object
rw = 1
Worksheets("Sheet1").Activate
Range("A1").Select
On Error Resume Next
For Each p In ActiveWorkbook.BuiltinDocumentProperties
Cells(rw, 1).Value = p.Name
Cells(rw, 2).Value = p.Value
If Err <> 0 Then
Cells(rw, 2) = "Error"
Err.Clear
End If
rw = rw + 1
Next
End Sub
and I found that in Excel, these properties returned errors:
Last Print Date (maybe because I've never printed this workbook)
Total Editing Time
Number of Pages
Number of words
Number of characters
Number of bytes
Number of lines
Number of paragraphs
Number of slides
Number of notes
Number of hidden Slides
Number of multimedia clips
Number of characters (with spaces)
Many of those look like they'd be associated with Word or PowerPoint.