TextFrame.ValidLinkTarget 方法 (Word)

Determines whether the text frame of one shape can be linked to the text frame of another shape. .

语法

expressionValidLinkTarget( _TargetTextFrame_ )

expression 是必需的。 一个代表 TextFrame 对象的变量。

参数

名称 必需/可选 数据类型 说明
TargetTextFrame 必需 TextFrame expression 返回的文本框要链接的目标文本框。

返回值

布尔值

备注

此方法返回 True ,如果 TargetTextFrame 是一个有效的目标,如果 TargetTextFrame 已经包含文本、 已链接,或如果形状不支持附加文本,则返回 False

示例

本示例实现的功能是:检查活动文档第一和第二个图形的文本框,以判断其是否能相互链接。 如果能,则链接两个文本框。

Dim textFrame1 As TextFrame 
Dim textFrame2 As TextFrame 
 
Set textFrame1 = ActiveDocument.Shapes(1).TextFrame 
Set textFrame2 = ActiveDocument.Shapes(2).TextFrame 
If textFrame1.ValidLinkTarget(textFrame2) = True Then 
 textFrame1.Next = textFrame2 
End If

另请参阅

TextFrame 对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。