Folllowing functions may be used as auxiliary, when dealing with TxtPosDesc. Note: these functions require specific constants. See Constants for TxtPosDesc functions.
' HasTS: true if the text postion description object has a
' complete text status set of valid properties
'
Function HasTS(objDesc)
HasTS = (objDesc.GetType = tptText)
End Function
' IsCmd: true if the text postion description object is
' a markup command
'
Function IsCmd(objDesc)
IsCmd = (objDesc.GetType = tptInCmd Or objDesc.GetType = tptStartCmd Or objdesc.Type = tptEndCmd)
End Function
' HasChar: true if the text postion description object has a valid character
' property value
'
Function HasChar(objDesc)
HasChar = (objDesc.GetType = tptInCmd Or objDesc.GetType = tptText Or objDesc.GetType = tptInExtCmd)
End Function
' HasMS: true if the text postion description object has a
' complete material status set of valid properties
'
Function HasMS(objDesc)
If HasTS(objDesc) Then
HasMS = True
ElseIf IsCmd(objDesc) Then
HasMS = (objDesc.GetJustElementType <> jeleNone)
Else
HasMS = False
End If
End Function