Description
Returns the number of texts contained in the article.
Available in Ted and Fred.
Syntax
iTxt = object.NTxts |
object
Required. Object name. Returned by Ted.GetActiveArticle.
Example
This script displays the number of texts in the article.
If Ted.HasActiveArticle Then
Dim objArticle = Ted.GetActiveArticle
Dim ITxt As Integer = objArticle.NTxts
MsgBox("This article contains " & CStr(ITxt) & " text(s).")
End If
This function uses the node label to determine if an article already has a specified element
Function HasType(ByVal strTypeName As String) As Boolean
If Ted.HasActiveArticle Then
Dim objArticle = Ted.GetActiveArticle
Dim nTxt As Integer = objArticle.NTxts
For t As Integer = 0 To nTxt - 1
Dim objNode = objArticle.GetTxtNode(t)
If objNode.Label = strTypeName Then
HasType = True
Exit Function
End If
Next
End If
HasType = False
End Function
msgbox (HasType ("head"))
Context
Article object