DocumentProperty.LinkSource property (Office)

Gets or sets the source of a linked custom document property. Read/write.

Syntax

expression.LinkSource(pbstrSourceRetVal)

expression A variable that represents a DocumentProperty object.

Parameters

Name Required/Optional Data type Description
pbstrSourceRetVal Required String Represents the name of the source of the document property.

Remarks

This property applies only to custom document properties; you cannot use it with built-in document properties.

The source of the specified link is defined by the container application.

Setting the LinkSource property sets the LinkToContent property to True.

Example

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

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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.