Table of contents
Collapse the table of content
Expand the table of content

DocumentProperty.LinkToContent Property (Office)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

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.


expression. LinkToContent( pfLinkRetVal )

expression A variable that represents a DocumentProperty object.


NameRequired/OptionalData TypeDescription
pfLinkRetValRequiredBooleanIndicates whether the document property is linked to the container document.


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.

For Excel, If LinkToContent is set to True, you must supply an address or range name for theLinkSource from the workbook. If the address or range name covers more than one cell, the custom document property takes the value from the top left cell of the range.


This example displays the linked status of the 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 = "" 
 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


DocumentProperty ObjectSync Object

Other resources

DocumentProperty Object MembersSync Object Members

© 2018 Microsoft