Share via


DocumentProperty.LinkToContent Property

Office Developer Reference

Is True if the value of the custom document property is linked to the content of the container document. False if the value is static. Read/write.

Syntax

expression.LinkToContent(pfLinkRetVal)

expression   A variable that represents a DocumentProperty object.

Parameters

Name Required/Optional Data Type Description
pfLinkRetVal Required Boolean Indicates whether the document property is linked to the container document.

Remarks

This property applies only to custom document properties. For built-in document properties, the value of this property is False.

Use the LinkSource property to set the source for the specified linked property. Setting the LinkSource property sets the LinkToContent property to True.

Example

This example displays the linked status of the custom document property. For the example to work, dp must be a valid DocumentProperty object.

Visual Basic for Applications
  Sub DisplayLinkStatus(dp As DocumentProperty)
    Dim stat As String, tf As String
    If dp.LinkToContent Then
        tf = ""
    Else
        tf = "not "
    End If
    stat = "This property is " & tf & "linked"
    If dp.LinkToContent Then
        stat = stat + Chr(13) & "The link source is " & dp.LinkSource
    End If
    MsgBox stat
End Sub

See Also