CustomProperty Object
TOC
Collapse the table of content
Expand the table of content

CustomProperty Object (Word)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

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

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.

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
Show:
© 2016 Microsoft