Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Latest commit

 

History

History
58 lines (35 loc) · 1.49 KB

textframe-validlinktarget-method-publisher.md

File metadata and controls

58 lines (35 loc) · 1.49 KB
title keywords f1_keywords ms.prod api_name ms.assetid ms.date
TextFrame.ValidLinkTarget Method (Publisher)
vbapb10.chm3866662
vbapb10.chm3866662
publisher
Publisher.TextFrame.ValidLinkTarget
ee946f58-669f-7150-0f40-2dd3b857e274
06/08/2017

TextFrame.ValidLinkTarget Method (Publisher)

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

Syntax

expression. ValidLinkTarget( LinkTarget)

_expression_A variable that represents a TextFrame object.

Parameters

Name Required/Optional Data Type Description
LinkTarget Required Shape The shape with the target text frame to which you want to link the text frame returned by expression.

Return Value

Boolean

Example

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

Dim txtFrame1 As TextFrame 
Dim txtFrame2 As TextFrame 
 
With ActiveDocument.Pages(1) 
 Set txtFrame1 = .Shapes(1).TextFrame 
 Set txtFrame2 = .Shapes(2).TextFrame 
End With 
 
If txtFrame1.ValidLinkTarget(LinkTarget:=txtFrame2.Parent) = True Then 
 txtFrame1.NextLinkedTextFrame = txtFrame2 
End If