Value Property (DocumentProperty Object)

Applies To

DocumentProperty Object.

Description

Returns or sets the document property value. Read-write.

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

Remarks

If the application doesn't define a value for one of the built-in document properties, reading the Value property for that document property causes an error.

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 value of custom document property one in the active workbook.


MsgBox ActiveWorkbook.CustomDocumentProperties(1).Value