共用方式為


Word) (TextFrame.ValidLinkTarget 方法

會決定一個圖案之文字圖文框是否可以連結到另一個圖形的文字圖文框。 .

語法

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 支援與意見反應