ValidLinkTarget Method

Applies To

TextFrame object.

Description

Determines whether the text frame of one shape can be linked to the text frame of another shape. Returns True if TargetTextFrame is a valid target. Returns False if TargetTextFrame already contains text or is already linked, or if the shape doesn't support attached text.

Syntax

expression.ValidLinkTarget(TargetTextFrame)

expression   An expression that returns a TextFrame object.

TargetTextFrame   Required TextFrame object. The target text frame that you'd like to link the text frame returned by expression to.

See Also

Next property, Previous property, TextFrame object.

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.

Set myFrame1 = ActiveDocument.Shapes(1).TextFrame
Set myFrame2 = ActiveDocument.Shapes(2).TextFrame
If myFrame1.ValidLinkTarget(myFrame2) = True Then
    myFrame1.Next = myFrame2
End If