LinkToContent 属性

       

如果指定的自定义文档属性链接到容器文档的内容上,则返回 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