Type Property (DocumentProperty Object)

Applies To

DocumentProperty Object.

Description

Returns or sets the document property type (can be one of offPropertyTypeBoolean, offPropertyTypeDate, offPropertyTypeFloat, offPropertyTypeNumber, or offPropertyTypeString). Read-only for built-in document properties; read-write for custom document properties.

To use this property, you should establish a reference to the Microsoft Office 95 Object Library by using the References command (Tools menu).

Example

This example displays the name, type, and value of a document property. You must pass a DocumentProperty object to the procedure.


Sub DisplayPropertyInfo(dp As DocumentProperty)
    MsgBox "value = " & dp.Value & Chr(13) & _
        "type = " & dp.Type & Chr(13) & _
        "name = " & dp.Name
End Sub

This example displays the type of custom document property one in the active workbook.


MsgBox ActiveWorkbook.CustomDocumentProperties(1).Type