Skip to main content

DocumentProperties.Count property

Gets a Long indicating the number of items in the DocumentProperties collection. Read-only.


expression.Count (pc)

expression A variable that represents a DocumentProperties object.


Name Required/Optional Data type Description
pc Required Long Represents the index of the document property.

Return value



This example displays the number of custom document properties in the active document.

MsgBox ("There are " & _
    ActiveDocument.CustomDocumentProperties.count & _
    " custom document properties in the " & _
    "active document.")

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>