Description
Returns true if there are paragraph tags in the current paragraph.
Syntax
Dim bResult = sysHasParaTags |
Code
Function sysHasParaTags()
' v1 returns true if there are para tags
sysHasParaTags = False
Dim bLeft As Boolean = False
Dim bRight As Boolean = False
Dim objCur = Text.GetCursor(modeSrcOn, cposCursor, False)
' find the previous end of para
Dim objFrom = objCur.Duplicate
Do
Dim objDesc = objFrom.GetDesc
If objDesc.GetType = tptPara Then
objFrom.Move(1)
bLeft = True
Exit Do
End If
Loop While objFrom.Move(-1) = 0
bLeft = True
Dim objTo = objFrom.Duplicate
' find the beg of text
Do
Dim objDesc = objTo.GetDesc
If objDesc.GetType = tptText Then
bRight = True
Exit Do
End If
Loop While objTo.Move(1) = 0
If Not objFrom.IsEqual(objTo) Then sysHasParaTags = True
End Function
See also