Description
Returns true if the specified text references an object (picture, multi-media or URL).
Available in Ted and Fred.
Syntax
bValue = object.HasRefObj nIdx |
object
Required. Object name. Returned by Ted.GetActiveArticle.
nIdx
Index of the text, ranging from 0 = first text in the article to NTxts-1 = last text in the article. If nIdx is outside this range a run-time error is raised. To get the idx of the current element, use GetCurTxtIdx.
Example
This script displays a message about referenced object for the current text.
If Ted.HasActiveArticle Then
Dim objArticle = Ted.GetActiveArticle
Dim iCurTxt As Integer = objArticle.GetCurTxtIdx
If objArticle.HasRefObj(iCurTxt) Then
MsgBox("Text " & iCurTxt & " has object.")
Else
MsgBox("Text " & iCurTxt & " has no object.")
End If
End If
Context
Article object
See also