BuiltInDocumentProperties Property

An accessor property which returns a Microsoft Office DocumentProperties collection of the specified document's built-in properties. Read-only Object.


*expression   * Required. An expression that returns a Document object.


Use BuiltInDocumentProperties and CustomDocumentProperties to return the properties of a document. The built-in properties list includes commonly used fields such as "Title," "Author," and "Creation Date." The custom document properties collection is empty by default.

The Document object does not use some of the available built-in document properties, such as "Last print date" and "Last save time." Requesting the Value of an unused document property causes a run-time error.


The following example creates a new document from a file and displays its built-in properties and their values. To avoid run-time errors caused by unused properties, the example disables error handling while reading the properties list.

Sub TestBuiltInDocumentProperties()

  Dim miDoc As MODI.Document
  Dim p As Office.DocumentProperty
  Dim strPropsInfo As String
  Set miDoc = New MODI.Document
  miDoc.Create "C:\document1.tif"
  On Error Resume Next
  For Each p In miDoc.BuiltInDocumentProperties
    strPropsInfo = strPropsInfo & p.Name & _
      ": " & p.Value & vbCrLf
  On Error GoTo 0
  MsgBox strPropsInfo, vbInformation + vbOKOnly, _
    "Built-in Document Properties"
  Set miDoc = Nothing
End Sub

Applies to | Document Object