目录

LinkToContent 属性

优质
小牛编辑
113浏览
2023-12-01

如果指定的自定义文档属性链接到容器文档的内容上,则返回True。如果该值是静态的,则该属性值为FalseBoolean 类型,可读写。

说明

该属性只用于自定义文档属性。对内置文档属性,该属性值总为False

LinkSource 属性可为指定的链接属性设置链接源。设置LinkSource 属性将使LinkToContent 属性值设置为True

示例

本示例可实现的功能为:显示自定义文档属性的链接状态。若要使本示例正常工作,dp 必须是一个有效的DocumentProperty 对象。

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