TextFrame.ValidLinkTarget Method (Word)

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

Syntax

expression .ValidLinkTarget(TargetTextFrame)

expression Required. A variable that represents a TextFrame object.

Parameters

Name

Required/Optional

Data Type

Description

TargetTextFrame

Required

TextFrame

The target text frame to which you want to link the text frame returned by expression.

Return Value

Boolean

Remarks

This method returns True if TargetTextFrame is a valid target and returns False if TargetTextFrame already contains text, is already linked, or if the shape doesn't support attached text.

Example

This example checks to see whether the text frames for the first and second shapes in the active document can be linked to one another. If so, the example links the two text frames.

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

See Also

Concepts

TextFrame Object Members

TextFrame Object