HasTagInPara Script

Build 1501 on 14/Nov/2017  This topic last edited on: 9/May/2012, at 13:03

Description

Returns true if the GNML tag strTag exists in current paragraph.

Usage:   bResult = HasTagInPara(">hld")

Syntax

bResult = HasTagInPara(strTagName)

strTagName

tag name with or without tag brackets. Add brackets for an exact match.

Code

Function HasTagInPara(ByVal strTag)

  ' Purpose:   Returns true if the GNML tag strTag exists in current paragraph

  ' Usage:   bResult = HasTagInPara(">hld")

  Dim iBuff As Short = 3

   Text.CursorSave(iBuff)

   SelectPara()

  Dim strParaText As String = Text.GetTxt

   Text.CursorRestore(iBuff)

   HasTagInPara = HasTagInString(strParaText, strTag)

End Function

See also

HasTagInString, HasTag, sysHasParaTags