BuiltInDocumentProperties Property
Applies To
Document object, Template object.
Description
Returns a DocumentProperties collection that represents all the built-in document properties for the specified document. Read-only.
Note If Microsoft Word doesn't define a value for one of the built-in document properties, reading the Value property for that document property generates an error.
See Also
ComputeStatistics method, CustomDocumentProperties property.
Example
This example inserts a list of built-in properties at the end of the active document.
Set myRange = ActiveDocument.Content
myRange.Collapse Direction:=wdCollapseEnd
For Each prop In ActiveDocument.BuiltinDocumentProperties
With myRange
.InsertParagraphAfter
.InsertAfter prop.Name & "= "
On Error Resume Next
.InsertAfter prop.Value
End With
Next
This example displays the number of words in the active document.
wrds = ActiveDocument.BuiltInDocumentProperties(wdPropertyWords)
MsgBox "This document contains " & wrds & " words."