Skip to main content
OCLC Support

FindText

Find the syntax, use, parameters, return values, and an example for the FindText macro command in Connexion client.
Syntax BOOL = CS.FindText (sText, bMatchCase)
Use to Find and highlight the next occurrence of specific text.
Parameters
  • For sText, enter the text you want to find, enclosed in quotation marks (“).
  • For bMatchCase, enter the boolean value to specify whether you want to match upper- and lowercase exactly or not match case:
    • True - Match upper- and lowercase exactly
    • False - Do not match case
Comments
  • FindText should precede ReplaceText.
  • FindText finds and highlights text only within a single cell of a field, not across cells. You can find tags or indicators or data separately, but not in combination.
Return values TRUE if the action is successful, or FALSE if not.
Example Sub Main()

     Dim CS As Object
     Set CS = GetObject(,“Connex.Client”)

     If CS.IsOnline = False Then
          CS.Logon ““, ““, ““
     End If

     CS.Search “WC”, “#1”

     CS.CursorRow = 1
     CS.CursorColumn = 1

     If CS.FindText(“Rand”, False) Then
          If CS.GetSelectedText(sText) Then
            MsgBox sText
          End If
     Else
          MsgBox “Rand - not found”
     End If

     nResult = CS.FindText(“rand”, True)

     If nResult = True Then
          If CS.GetSelectedText(sText) Then
          MsgBox sText
        End If
     Else
          MsgBox “rand - not found”
     End If

     CS.FindText “Favorite”, False

     If CS.GetSelectedText(sText) Then
          MsgBox sText
     End If
End Sub

What this example does
  • Logs on to Connexion if not already logged on, using the default authorization and password you selected in Tools > Options > Authorizations tab.
  • Searches WorldCat for record number 1.
  • Moves the cursor to the first column of the first row (beginning of the record).
  • Searches the record for the text Rand, disregarding upper- and lowercase (case- insensitive). If found, gets and returns the first occurrence of the text or returns the message: Rand - not found.
  • Searches the record for the text rand, matching case exactly (case-sensitive). If found, gets and returns the first occurrence of the text or returns the message: Rand - not found.
  • Searches the record for the text Favorite (case-insensitive). If found, gets and returns the first occurrence of the text.