Value Property Example

This example displays the name, type, and value of a document property. For the example to work, dp must be a valid DocumentProperty object.

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 the search criteria (if it exists) in a dialog box. If the second value doesn't exist, the example displays another message.

With Application.FileSearch.PropertyTests(1)
If .Value = "" Then
   MsgBox "You haven't specified a value."
Else
    MsgBox "The value you've set is: " _
    & .Value
End If
End With