共用方式為


Word) (TextFrame.HasText 屬性

如果指定的圖案具有相關的文字,則為 True。 唯讀的 Boolean

語法

運算式HasText

表達 代表 TextFrame 物件的變數。

範例

本範例會在使用中文件上的第二個圖案含有文字,而且文字溢出其圖文框時顯示訊息。

Dim docActive As Document 
 
Set docActive = ActiveDocument 
With docActive.Shapes(2).TextFrame 
 If .HasText = True Then 
 If .Overflowing = True Then 
 Msgbox "Text overflows the frame." 
 End If 
 End If 
End With

另請參閱

TextFrame 物件

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應