Share via


CustomProperty Object

Word Developer Reference

Represents a single instance of a custom property for a smart tag. The CustomProperty object is a member of the CustomProperties collection.

Remarks

Use the Item method—or Properties(Index), where Index is the number of the property—of the CustomProperties collection to return a CustomProperty object.

Use the Name and Value properties to return the information related to a custom property for a smart tag. This example displays a message containing the name and value of the first custom property of the first smart tag in the current document. This example assumes that the current document contains at least one smart tag and that the first smart tag has at least one custom property.

Visual Basic for Applications
  Sub SmartTagsProps()
    With ActiveDocument.SmartTags(Index:=1).Properties.Item(Index:=1)
        MsgBox "Smart Tag Name: " & .Name & vbLf & _
            "Smart Tag Value: " & .Value
    End With
End Sub

See Also