ValidLinkTarget Method 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